How Do You Create a .ppk File from a .pem File?

Problem Scenario
You want to use a key kair to log into AWS instances. You created an AWS EC-2 instance (aka a virtual machine or server) running Linux.  You want to connect to this Linux server (a VM).  You created a key pair when you created this VM.  You downloaded the .pem file.  You need a .ppk file to log in.  What should you do?

1.  Download a puttygen.exe file from this location. (If you have a 32 bit version of Windows, use this link.  If you have a 64 bit version of Windows, use this file.)

2.  Open puttygen.exe (as nothing needs to be installed).

3.  In PuTTY Key Generator, go to File -> Load Private Key.  Find the .pem file that you have.

4.  You should get a "PuTTYgen Notice."  Click "OK" to that.

5.  Enter a Key Passphrase in the field for "Key passphrase". Remember this password and click "Confirm passphrase".

6.  Click "Save Private Key."  Give it a name that you want.  

7.  Open the regular putty.exe.  Expand Connection -> SSH -> Auth.  Near the text field for "Private key file for authentication" field, click the "Browse" button.  Open the .ppk file you just created (in step #6 above).

8.  In Putty go to the "Session" field.  Then click on "Host Name."  Enter the IP address of the EC2 instance you just created.  Click "Open."

9.  The username will be ec2-user if the server is running RHEL or SUSE.  If the server is running Ubuntu, the username will be ubuntu.  The password will be the one you entered in the step that created the .ppk file.

Leave a comment

Your email address will not be published. Required fields are marked *