How to Recover the Public Key From the Private One

If you somehow loose your public key file (by default called id_rsa.pub), do not panic, the public key can be recoverd from the private key.

This is how you recover your public key from the private one:

Syntax: ssh-keygen -y -f ~/.path/to/private_key > ~/.path/to/public_key

$ ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub

Tagged with: , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!