ssh - configuring passwordless logins

Saturday, December 05 2009 @ 05:15 AM EST

Contributed by: r00t

This is a quick reference for setting up public keys in ssh so you don't have to constantly type your password in front of prying eyes and hungry keyloggers.

Step 1:

Create a key pair if you dont already have one.  Most ssh clients should now support RSA keys which will be located in ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub

The command to create a new key pair is:  ssh-keygen -t rsa  just accept the defaults and leave the passphrase blank since were setting up passwordless access.

Step 2:

Copy your key to the remote system  ssh-copy-id -i ~/.ssh/id_rsa.pub user@othersystem 

Step 3:

Test it  ssh user@othersystem and it should connect you without prompting for a password.

If it doesn't work then check your ssh config file  /etc/sshd/ssh_config  and be sure that you have both RSAAuthentication and PubkeyAuthentication set to yes

Comments (0)


empirelinux
http://www.empirelinux.org/article.php?story=20091205051526257