Passwordless Entry
I forgot how to SSH without a password today, so that requires that I make an entry here so I will remember for all time (apparently I’ve given up on my brain’s ability to retain information).
On your local machine:
ssh-keygen -d
Enter a passphrase if you wish to lock the private key forever-more. If you enter a passphrase, be prepared to be prompted for that instead of your password. You will be prompted for the passphrase each time you attempt to use the key (more on that later).
Once you have the private and public keys generated, copy your public key to the remote host you wish to connect to like so:
scp .ssh/id_dsa.pub username@remotehost:.ssh/authorized_keys
Then you’re ready to go. Just ssh username@remotehost and you should not be asked for a password. If you set a passphrase though you will be asked for that each time. To avoid re-entering the passphrase each time, run:
ssh-agent
in your terminal. This program manages your keys and passphrases. You add your key to it by typing:
ssh-add
It will then ask you for your passphrase. This will be the only time you need enter it for that session, thus the advantage of using ssh-agent and adding your key to it. Of course, all of that is in no way necessary if you didn’t add a passphrase to your private key to begin with.
[addendum]