First generate an ssh key on each machine and copy that to the other machine. I ran the following on both of them:
Linux> ssh-keygen -t rsa Linux> ssh-copy-id -i ~/.ssh/id_rsa.pub userName@server0x
I then tried to do a remote login from server01 to server02. However, it is still prompting me for the password. It seems that "password-less login" is not working. The permissions for the .ssh directory and authorized_keys file is 700 and 600, respectively. These are the correct permissions.
Further investigation revealed that the home directory of the user that I use to generate the keys should have a drwxr-xr-x permission. Thus, after changing the attributes of the directory using
Linux> chmod 755 /path/to/home/directoryI was able to log in remotely without the password being asked.
you just blew my mind.
ReplyDelete