Learn how to convert pem file to ppk format

In this blog post you will be going to learn how to convert pem file to ppk format. PEM is a container format that contains public certificate (such as with Apache installs, CA cert files, chain certs that include entire certificate chain including public key, private key, and root certificates.

For connecting to AWS EC2 server launched with ubuntu or amazon ami secured with ssh key or any other server with key based authentication where you have access to .pem file you can easily connect on command line through ssh command. If you have linux or mac system then you can use below command to connect to server through ssh.

ssh -i /pathto.pemfile sshusername@ipaddress

If you have windows machine then you can use putty ssh software to connect to server, but in putty pem format is not accepted. You need to convert that to .ppk format. You can convert .pem to .ppk through two ways. One is through ftp and one is through puttygen software. I will be going to show you both the ways to convert .pem to .ppk. PuTTYgen is a basically key generator which generates pairs of public and private keys to be used with WinSCP. Puttygen generates RSA, DSA, ECDSA, and Ed25519 keys.

Converting through puttygen

Step 1: Download puttygen

You can download puttygen software from – https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Step 2: Open puttygen

Go to Windows Start menu → All Programs → PuTTY→ PuTTYgen. You can double click on puttygen.exe as well if in case it does not work from there.

puttygen

Step 3: Load PEM File

Click the Load button and browse and select .pem file which needs to be converted to .ppk. The file may not be visible directly in the file dialog, make it choose all files or *.pem.

pem select

Step 4: Save Private Key

You may get a pop screen for successfully imported foreign key. Press ok, and then click on save private key. You can name it .ppk or .txt at some location.

import foreign

private key

Step 5: Connect to Server

Finally you are done, you can use this private key .ppk to connect to your aws instance or other server to which this key belongs.

3 Comments

Add a Comment

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