How to Convert a .pem File to .ppk
Tags:

If you are dealing with SSH and using PuTTY, chances are you need a .ppk file to remotely connect to your server.

A lot of open source software, as well as AWS, generate .pem files for you to use. But if you are using something like PuTTY or WinSCP, you will most likely need to use a .ppk file. Converting .pem files to .ppk is easy using a program called PuTTYgen.

PuTTY and PuTTYgen can be downloaded from here. The installer will install both PuTTY and PuTTYgen. After you have it installed, open PuTTYgen, which should look something like this:

Click on "Load" and select your .pem file. (If you're on Windows and don't see the file, make sure you're viewing "All Files (*)" and not just "PuTTY Private Key Files (*.ppk)").

If you get a pop up that says something about "Successfully imported foreign key (OpenSSH SSH-2 private key (old PEM format))...", just click "OK". Click "Save Private Key". You will see this warning:

Adding a passphrase depends on your use case. For example, you may be using this key in a 3rd-party Continuous Integration pipeline that isn't able to decrypt SSH keys so you won't want a passphrase.

Now you're able save your converted .pem file in .ppk format!