Tuesday, October 7, 2008

SSH password less log-in problem

Machine1: re-solx86 (A Solaris x86 machine)
Machine2: vm-rh21-lager (A RHEL machine)

Requirement: Need to establish a password less login from Machine2 -> machine1

Solution:
Login machine1 -> machine2
1) Created RSA keys by running command "ssh-keygen -t rsa" on Machine1
2) Added content of "id_rsa.pub" file from machine1 to the file "authorized_keys" in machine2
Login from machine1 -> machine2 is success

Login machine2 -> machine1
1) Added
content of "id_rsa.pub" file from machine2 to a file "authorized_keys" in machine1
Login from machine2 -> machine1 still asking for password.

Problem: Permissions of ~/.ssh directory in machine1 is 755. ssh won't work if permission of ~/.ssh is other than 700.
Solution: Changed permission of
~/.ssh to 700, now it is successful