April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Converting Your Keypair File

Purpose

The keypair you create will be in the .pem format. If you plan on using PuTTy to SSH to a Linux instance from a Windows computer you will need to convert that keypair file to the .ppk format. This article will show you those steps.

Notes

Your original private key pair file (.pem) is required. If you no longer have the file then you will need to create a new key pair.

Pre-requisites

  • Have your keypair created and your .pem file ready to convert.
  • Must have the PuTTYgen utility downloaded. You can download it from their website.

Walk-through Steps

Converting Your Keypair .pem file to a .ppk file

  1. Locate the private key you saved as a .pem file using the Key Pairs article previously linked.
  2. Open puttygen.exe and click on the Conversions menu and then Import Key. Search for your .pem file you created for your keypair and select it.

puttygen2

3. Your key will populate in the Puttygen window and then you want to click Save Private Key. You will be prompted with a pop-up asking you if you are sure you want to save the key without a passphrase and you can click Yes on that. You will then name the file and it will save it in the .ppk format.

 

puttygen3

 

4. You now have your private keypair file which you can use in the Putty program to SSH to your instance! You can view the knowledge-base article below for instructions on using your .ppk file to SSH to your instance using Putty:
Connecting to your Instance

Converting Your Keypair .ppk file to a .pem file

Another scenario you may run into is you may have your .ppk file but you need to convert it back to a .pem file. You can also do this via Puttygen with these steps:

1. Open the Puttygen program

2. Click the Load button and locate your .ppk file:

 

puttyload

3. With your key loaded, go to the Conversions menu and click Export OpenSSH key:

puttyconvert

 

NOTE: It will prompt you asking “Are you sure you want to save this key without a passphrase to protect it?” and if you choose to not use a passphrase then you can select Yes. If you use a passphrase then it must be set in the Puttygen program in the Key passphrase / Confirm passphrase fields.

  1. Save the file with a .pem extension and you’re done!

 

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>