How to convert PEM file to PPK using PuTTYgen in Ubuntu

Sumit Patil picture Sumit Patil · Jan 20, 2015 · Viewed 34.4k times · Source

I have created an EC2 instance on AWS. I want to connect to the instance using PuTTY, but it requires PPK file. I have PEM file which I want to covert into PPK using PuTTYgen.

How do I use PuTTYgen on Ubuntu to convert PEM file to PPK?

Answer

Martin Prikryl picture Martin Prikryl · Jan 20, 2015

With *nix version of PuTTYgen:

puttygen mykey.pem -o mykey.ppk

See PuTTYgen man page.


For Windows users: Note that Windows version of PuTTYgen does not support key conversions from command-line.

You can use WinSCP with the /keygen command-line switch instead to convert the key, like:

winscp.com /keygen mykey.pem /output=mykey.ppk

For compatibility with PuTTYgen, WinSCP also supports its syntax:

winscp.com /keygen mykey.pem -o mykey.ppk