Richard Penman
Passwordless ssh

28 Feb 2008

It becomes a hassle hopping between servers with ssh if you have to type the password each time. To enable passwordless ssh go:

ssh-keygen -t dsa (ENTER to skip password)  
scp ~/.ssh/id_dsa.pub user@other_server  

And on the other server:

cat ~/id_dsa.pub >> ~/.ssh/authorized_keys  
rm ~/id_dsa.pub  

Depending on the server may need to set permissions so no one can view the file:

chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 750 ~

Now you can hop between servers without a password.

blog comments powered by Disqus