OpenSSH pubkey gen

Found something pretty awesome today:

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

From the ‘man ssh-keygen’

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

This will let you output the public key from a private key in the ANS1 format that OpenSSH uses.

Advertisements