Want to connect to a remote server without having to type in those annoying passwords? Have you generated your public and private keys? That is a must my friend.

$ ssh-keygen -t dsa -f filename

This will create two files: 'filename', your private key, and 'filename.pub', your public key. Store the private key away (probably $HOME/.ssh) and put your public key on the remote server. Assuming you put the private key in the $HOME/.ssh directory, you need to run

$ ssh-add $HOME/.ssh/filename

and this will put your new key into ssh's knowledge.

IMPORTANT When prompted, do not enter a passphrase, or else you will need this passphrase to use the key, thus negating the purpose of the key for password-less connection. Do not use this key pairing when you need the added security of a passphrase. You have been warned. **

Now we need to setup the remote machine. This is fairly trivial using the ssh-copy-id command.

$ ssh-copy-id -i $HOME/.ssh/filename.pub user@remotemachine.com

The command should return with a success message and an ssh command to try your new key out with. If this doesn't work, RTFM!