PuTTYgen - Convert PEM to PPK

by
Jeremy Canfield |
Updated: April 27 2023
| PuTTYgen articles
Let's say you have a PEM file that contains an RSA private key. The content of the PEM file should contain something like this.
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAl/qBJwMtUFnLns9cGCjnC1EKuWwwK+ItcLF7WoDOISxfmE/l
1TSBEos16nyqv6qMQOfNu/1sGJ8IHCWeqMuWJO4nY3RebOJ2jinw2aiLtMkzQjRQ
KGVs62h1VzLx2n8IVLXOSnEmTRRRpNIH5vWx2EEBtchtCXGiUcJIRt8Q1UVsfTbp
H7GvAVDqGMfnXqizqbGtfmDZTtAmq4JYReUUej1NnE8O8hLFNXqcrioo27puF8Ti
gPoTpp9p8ncidktd3NWck9jJGvEoaA3oxsKMgZGlPviMkhTv70Ovh7ShPpZ38ETB
7SkOcn6W4hbDHFqSihmrf0S7JaSN/RYKY2wVMQIDAQABAoIBADFOVkRf5X2iBEub
npc//eVP/5i0ntQ95twe2JQ+IaHlkYYKtdf71rw7adyPYZ4ZKLOOANMynrVGMw1e
-----END RSA PRIVATE KEY-----
Here is how you can create a PPK file using the PEM file.
Windows
- Download and install PuTTYgen from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
- Start puttygen.
- Ensure RSA is selected (since the PEM file contains an RSA private key in this example).
- Select Load and select the PEM file.
- Select Save private key button to create a PPK file.
Linux
On a Debian distribution (Ubuntu, Mint), apt-get can be used to install the putty-tool package.
apt-get install putty-tools
On a Red Hat distribution (CentOS, Fedora, Red Hat), dnf or yum can be used to install the putty package.
dnf install putty
And here is how you would create a PPK file using the PEM file.
puttygen example.pem -O private -o example.ppk
Did you find this article helpful?
If so, consider buying me a coffee over at