• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

SSH with no password problem

Hi,
This question has been asked many times but non of the solutions seems to fix my problem.

On pc-a I (windows xp running Cygwin) I generated ssh keys and copied to pc-b (RHEL). I wal able to ssh to pc-b from pc-a with no problem.
Later I had to fix an NSF problem by changing user and goup ID of the user on pc-b. I also changed the rights to user dir.
all this broke the ssh set up. So I did all original steps to create no passwd ssh connection. However it would not work this time. I made sure there is no group write privilege for group on /home/user/.ssh path. I chmod .ssh to 700 and known_hosts to 600, user and group both set to user's for testing and none works.
This problem is duplicated for two redhat machines exactly the same way with none of the fixes working for any of them.

what else should I be looking at?

thanks in advance.
0
mehranalmasi
Asked:
mehranalmasi
2 Solutions
 
BlazCommented:
Are you able to log in to the machine with this same username and using password?
0
 
Dushan De SilvaCommented:
Please check firewall, ports are correctly opened.

BR Dushan
0
 
NopiusCommented:
Run 'sshd -ddd' on RHEL, it will run in foreground in debug mode, then try to connect from pc-a.
0
 
pjedmondCommented:
Firstly check connectivity:

telnet hostname 22

[spud@bigserver spud]# telnet 192.168.1.101 22
Trying 192.168.1.101...
Connected to 192.168.1.101 (192.168.1.101).
Escape character is '^]'.
SSH-1.99-OpenSSH_3.9p1

Telnetting confirms that the port (ssh port 22) is correctly accessable and confirms that ssh is runing on it.

Next try and connect in verbose mode so that you get loads of useful info as to where the fault is:

ssh -vv 192.168.1.101

The -vv gives shed loads of information from the client side, and you'll see exactly at what point the connection fails or is rejected.

Finally, I always recommend this article if you need to go back to basics:

http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/

HTH:)




0
 
limneosCommented:
There are several reasons for this to happen, I had the same problem and I fixed it.

first , though, write here the errors reported in /var/log/secure whenever you try to connect.

if you get a permission denied error, try changing your sshd_config file to include the following:
#
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
#
also, you might want to copy the key file in your /etc/ssh/ssh_known_hosts file
root@host# cat yourkey.file >> /etc/ssh/ssh_known_hosts
root@host# service sshd restart
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now