Retrieve/regenerate ssh public key from private key

From man page of ssh-keygen:

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

ssh-keygen -y [-f input_keyfile]

Command:
$ ssh-keygen -y -f ~/.ssh/id_dsa > ~/.ssh/id_dsa.pub

發表迴響