Regenerating your (lost) public SSH key (id_dsa.pub)

There is actually no real reason to protect your public SSH key; the more people "steal" your public key, the more machines you could login to.

But, for some unknown (likely stupid/invalid) reason I discovered that my public key was not installed on my laptop. OpenSSH has options to regenerate this public key using the -y switch. From the man-page:

    -y      This option will read a private OpenSSH format file and print an
            OpenSSH public key to stdout.

Okay, so run ssh-keygen -t dsa -y > ~/.ssh/id_dsa.pub to safe the output generated in a file called id_dsa.pub.

Now distribute this id_dsa.pub file to all machine you want to login to, add it to the authorized_keys file. You don't need to re-distribute the key to all machines that had your "old" public key.

Here is a website with loads of useful SSH tips