By default the ssh-keygen utility stores our public key in the Base64 encoded OPENSSH format. However many SSH utilities in our Windows system can only read RSA format.
To convert the file first duplicate the private key you want to convert!
It's an important step to conserve the original file because the command will overwrite the file it's run on.
# Convert private key to RSA type ssh-keygen -p -m pem -f [private key file]
Example
In this example we have the private key as id_rsa in our default .ssh directory in our profile, which we copy in PrivKey.pem.
This PrivKey.pem file is then converted to RSA type:
# Convert PrivKey.pem cd ~\.ssh\ cp id_rsa PrivKey.pem ssh-keygen -p -m pem -f PrivKey.pem
Community Questions