By Manny Fernandez

May 17, 2020

Converting a PPK file to a PEM file

Converting a PPK file to a PEM file

Have you ever had someone deploy a device in AWS and they chose the .PPK option to save the key.  Then you need to retrieve the administrator password but you require a .PEM file instead?  Here is a quick way to do it.  I run homebrew on my MacBook.  If you run macOS X and you are not running homebrew, check out this article.  I updated the article to show the reverse as well.

Install PuTTY

The first thing you will need to do is install putty.  If you are running Homebrew run the following command.

brew install putty

2020-05-17_00-26-23.png

If you are running Linux, then you can use

You can use either yum or apt depending on your distro.

yum install putty or apt-get install putty

2020-05-17_07-32-37

Now Convert the PPK to PEM

puttygen monkey.ppk -O private-openssh -o monkey.pem

2020-05-17_00-29-40.png

Getting the Password in AWS

Although this is more than the PPK to PEM, I decided to update the article to show the process of using said .PEM file to retrieve the password

Screen Shot 2020-05-17 at 8.07.14 AM

By right clicking on the instance, you can click Get Windows Password

2020-05-17_08-01-19

I blocked out the Key Name but the key name would be displayed.  It will then ask you for your .pem file.

2020-05-17_08-03-20

Once you enter the .pem file and choose Decrypt Password you should see your password.

Going the Other Way (PEM to PPK)

If you need it the other way “pem to ppk” you can use the following command:

sudo puttygen monkey.pem -o monkey.ppk -O private

Hope this helps

 

FortiGate SSH Public Key Authentication: Every Check It Runs and How to Lock It Down

FortiGate SSH Public Key Authentication: Every Check It Runs and How to Lock It Down

Set up FortiGate SSH public key login, learn every check the FortiGate runs during it, and close the password path that stays open by...

Read More
Is SCEP Viable Long Term? SCEP Alternatives, RFCs and a Migration Plan

Is SCEP Viable Long Term? SCEP Alternatives, RFCs and a Migration Plan

SCEP alternatives explained: RFC 8894 limits, EST, ACME device attestation and CMPv2, plus a step-by-step plan to retire SCEP safely.

Read More
EJBCA Internal CA: Deploy a Private PKI for Your Local Servers with Docker

EJBCA Internal CA: Deploy a Private PKI for Your Local Servers with Docker

Deploy an EJBCA internal CA in Docker with MariaDB, build a two-tier Root and Issuing CA, and issue trusted TLS certificates to local servers.

Read More