Generate SSH key

ssh key

Github saves the day

Key with passphrase

With password foobar.

openssl genrsa -aes128 -passout pass:foobar -out privkey.pem 2048
openssl rsa -in privkey.pem -passin pass:foobar -pubout -out

pem to ssh-rsa

chmod 600 privkey.pem
ssh-keygen -y -f privkey.pem >

Cert request

Server key without pass phrase or self assigned cert

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout myPrivateKey.key -out myCert.pem


openssl rsa -in ./myPrivateKey.key -out myPrivateKey_rsa
chmod 600 ./myPrivateKey_rsa

Public key

ssh-keygen -y -f myPrivateKey_rsa >

To convert to PPK, load myPrivateKey_rsa into PuttyGen and export myPrivateKey.ppk

openssl.conf NOT FOUND!
Windows doesn’t save your openssl.conf location.
You need to set it in environment variables.

set OPENSSL_CONF=C:\xampp\apache\conf\openssl.cnf

Cert request reference

RSA Key reference

Azure Reference