Wednesday, October 22, 2014

Generate Public Key From A Private Key

When we've got the private key, say id_rsa,  we can regenerate the public key by:
ssh-keygen -f ./id_rsa -y > ./id_rsa.pub

It is well-explained in ‘man ssh-keygen’:
-y    This option will read a private OpenSSH format file and print an OpenSSH public key to stdout.
-f    Specify the private key file.


© 2014-2017 jason4zhu.blogspot.com All Rights Reserved 
If transfering, please annotate the origin: Jason4Zhu

No comments:

Post a Comment