Sharing Knowledge | System Admin Articles

Password-less SSH Login

Here is the procedure to establish trust relationships between Unix boxes for a particular user using SSH. it can be helpful in script file transfers and other admin activities. 

Here i am using the source server as server1 and destination server as server2 as example.


1.Login as user whom you want to login without password on server1

2.Type: ssh-keygen -t rsa

      Note: If you do not want to be prompted, leave passphrase blank

            The default directory for SSH keyfiles is <USER_HOME_DIRECTORY>/.ssh/

4.copy the contents of <USER_HOME_DIRECTORY>/.ssh/ (there should only be one line)

5.Place this line on server2,in <USER_HOME_DIRECTORY>/.ssh/authorized_keys

that's it, you should now be able to ssh/sftp/scp from server1 to server2 without being prompted for a password!

Note: Make sure, "RSAAuthentication yes" in your /etc/ssh/sshd_config file. On many Linux installations this setting is commented out in a default install

Please dont forget to leave your comments.

Labels: Quick HOWTO, SSH

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

1 Comments for "Password-less SSH Login"

Your posts are very inspiring for me, by reading your posts, I get lots of ideas to write new posts on the blog that I have. I hope your post worthwhile for others as well

What do you think about this Article? Add your Opinion..!

Back To Top