No More SSH Password

 

This is intended for Linux, Unix, OS X users who use SSH to connect to a remote server and tire of repeatedly entering their password. (This works really well for subversion users for instance.) In this short post we’ll create a public key and add this key to your server’s list of good guys. Just be careful, anyone who could access your ~/.ssh directory could copy this file and use it to do the same. Be smart!

 

From your home directory enter the following. When prompted for input just hit enter.

 

ssh-keygen -t dsa

 

chmod 600 .ssh/id_dsa

 

Upload the id_dsa.pub file that now resides in ~/.ssh to your server, log into your ssh account, and enter:

 

cat /home/MYUSER/id_dsa.pub >> /home/MYUSER/.ssh/authorized_keys

 

chmod 700 /home/MYUSER/.ssh

 

 

 

 

Leave a Reply

 

You must be logged in to post a comment.