Link to home
Start Free TrialLog in
Avatar of mehranalmasi
mehranalmasi

asked on

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.
Avatar of Blaz
Blaz
Flag of Slovenia image

Are you able to log in to the machine with this same username and using password?
Please check firewall, ports are correctly opened.

BR Dushan
ASKER CERTIFIED SOLUTION
Avatar of Arty K
Arty K
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of limneos
limneos

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