Monday, April 20, 2015

Converting ssh-keygen created key into PEM format (using OpenSSL)

Say I have created RSA key and it's located in my $HOME:

Create private key:

najmi@quds:~/.ssh$ openssl rsa -in id_rsa -outform pem > rsa_priv.pem


Create public key based on the private key above:

najmi@quds:~/.ssh$ openssl rsa -in rsa_priv.pem -pubout -out rsa_pub.pem 


No comments: