How to convert a PEM file to PPK format example
When you create an Amazon EC2 instance, AWS generates the access keys in a Privacy Enhanced Mail (PEM) format.
For those who want to PuTTY to their EC2 instance, there’s a complication: PuTTY does not natively support the PEM file format. You must convert the PEM to a PPK file in order to PuTTY into the instance. Fortunately, the process is straightforward.
PEM to PPK conversion steps
Here are the steps to quickly convert a PEM to a PPK file with PuTTYGen:
- Download PuTTYGen from puttygen.com
- Open PuTTYGen and click the Load button
- Set the filetype to *.* so the AWS PEM file is visible
- Select your PEM file and PuTTYGen will import it
- Click Save Private Key and PuTTYGen will convert the PEM to a PPK file
Step 3 often causes problems, because the file selector is set to PPK so the PEM will not be visible even if you select the correct folder. Just change the filetype to *.* and every filetype will be visible.
Connect to EC2 from PuTTY
Once the PEM to PPK conversion is complete, simply register the PPK file in PuTTY’s SSH authentication tab.
To SSH into an EC2 instance, find the SSH URL in the SSH client tab of the EC2 instances’ connection tab. Paste this in as PuTTY’s hostname and click Open.
PuTTY, EC2 and PEM files
Once the connection is made, you can issue commands and configure your EC2 instance at will.
And that’s how easy it is to convert a PEM file to PPK format and PuTTY into remote servers such as Amazon EC2 instances.