SSH |> Covert New Format SSH Private Key to PEM



IF YOU JUST SOLVED SOME PROBLEM, WELCOME TO DM qaRabbit ON TWITTER, OR CREATE A PULL REQUEST IN GITHUB REPO.

OpenSSH 6.5 and later support a new, more secure format to encode your private key

ssh-keygen -p -m PEM -f ~/.ssh/id_rsa

Generate PEM format private key with ssh-keygen:

ssh-keygen -m PEM -t rsa -b 4096 -C "email@example.com"

Generate public key from private key:

ssh-keygen -l -f ~/.ssh/id_rsa

Reference: