How to convert putty ppk file to pem file

Basically when you working on windows, you most likely use putty to connect to the server. Putty generates the ppk file as the private key.

But the ppk file cannot be using to connect classic linux server or ec2 in AWS. You need to convert this ppk file to pem first in order to use it.

for ubuntu:

$ sudo apt install putty-tools

for centos and other linux:

$ sudo yum install putty

Start converting the ppk to pem

$ puttygen key.ppk -O private-openssh -o key.pem

And you might want to set the permission

$ chmod 600 key.pem

Now the key.pem is ready to use.

Leave a Comment