I only use DSA keys to login to the servers I administrate. The command to generate a public and private key is
ssh-keygen -b 1024 -t dsa
you will then be prompted where to save the keys press enter to save them in the default location.
Generating public/private dsa key pair.
Enter file in which to save the key (/Users/user/.ssh/id_dsa):
The keys will then be saved
then you will be prompted to enter a passphrase. Dont enter a passphrase just press enter twice.
Enter passphrase (empty for no passphrase):
The terminal will now display the key fingerprint.
Now in your .ssh directory you need to copy id_dsa.pub to your user account on the server and add it to the file authorized_keys2
they way I do this is to use the scp command
scp /Users/user/.ssh/id_dsa.pub serveraddress:
I then ssh into the server and issue this command
cat id_dsa.pub >> /Users/user/.ssh/authorized_keys2
This is useful as it will add the key to the end of the file authorized_keys2. so if you add any subsequent keys you will not overwrite the previous key. This is useful if you login to servers from different computers.
Once you have your public key working you can disabled password authentication and use public key authentication only. This makes your server very secure.