More on SSH passwordless login (using RSA/DSA key)
After experimenting with my Nokia E61 and putty, I just found out a better way to add the public key to remote servers. This assume that you’re using a linux box as a client.
On your local computer, type:
$ssh-keygen -t rsa
Note: Just press “enter” for every question for truly passwordless login
Generating public/private rsa key pair.
Enter file in which to save the key (/home/kramfs/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/kramfs/.ssh/id_rsa.
Your public key has been saved in /home/kramfs/.ssh/id_rsa.pub.
Once your RSA key-pair is generated, you need to add the public key to your server’s ~/.ssh/authorized_keys file. You can do this very easily by typing (on your local computer):
$ssh-copy-id ~/.ssh/id_rsa.pub firstname.lastname@example.org
it will ask for “username” password on host “example.com”, the next connection will be passwordless
Now try logging into the machine, with “ssh ‘email@example.com'”, and check in:
to make sure we haven’t added extra keys that you weren’t expecting.
kramfs@mobile1:~/.ssh$ ssh firstname.lastname@example.org
Last login: Wed Feb 6 14:00:44 2008 from 192.168.1.50
As you can see, it did not ask me for my password anymore since the authentication was done via the RSA/DSA key.