Thursday, June 2, 2011

password-less login with ssh

On the originating machine:
ssh-keygen -t rsaSave the key in the default file (~/.ssh/id_rsa) and do not use a passphrase. This will create a file ~/.ssh/id_rsa.pub.

Add the contents of this file to the file ~/.ssh/authorized_keys on the remote machine (i.e., the machine on which you want to log on). Whereas the id_rsa.pub file is world readable, the authorized_keys file should only be readable by you. Use chmod to set the permissions accordingly.

No comments:

Post a Comment