Published : 2018-12-05

SSH public key regeneration

SSH keys allow authenticated and secure authentication to SSH servers.

You may have lost the public key file; fortunately we can easily regenerate it.

To retrieve the public key associated with a private key, simply run keygen and pass it an existing private key file as an argument:

ssh-keygen -y -f ~/.ssh/id_rsa