Setting up a public/private keyset for SSH allows you to log in to another machine running SSH without having to manually enter a password. This can be useful for saving time or automated processes. The setup consists of merely two simple steps.
Firstly at a terminal prompt, type:
ssh-keygen -t dsa
You will then see the following (or similar):
Generating public/private dsa key pair.
Enter file in which to save the key (~/.ssh/id_dsa): (just press enter)
Enter passphrase (empty for no passphrase): (just press enter)
Enter same passphrase again: (just press enter)
Your identification has been saved in ~/.ssh/id_dsa.
Your public key has been saved in ~/.ssh/id_dsa.pub.
The key fingerprint is:
(some long key)
The key's randomart image is:
(a picture made of ASCII characters)
Now you just need to copy the contents of: ~/.ssh/id_dsa.pub to the file ~/.ssh/authorized_keys
… on any machines that you would like to be able to connect to (for example your server).