If you have lost your SSH Public key but still have your Private Key you can extract the private key with the following command:
1 2 3 |
|
Your ssh public key will now be displayed.
the above was entered on a Mac, the same applies for Linux obviously your home drive location would be /home – I would recommend this option over opening the file and copying and pasting it out, I would then echo the input into a key file and copy it to the remote server.