fbpx

How to covert a .ppk SSH key file to .pem SSH key file

Background

A client might provide you with a .ppk file, which is typically used with Putty and SSH connections. If, however, you are using Ubuntu or CentOS, you will need the key in .pem format. This article explains how to quickly convert said .ppk file to .pem file.

Steps to convert a .ppk file to a .pem file

Follow these simple steps:

sudo apt-get install putty-tools
puttygen file.ppk -O private-openssh -o file.pem

Now file.pem is converted! To use it, remember to change the permissions to r  first and then specify the new .pem file on the command line when connecting:

chmod 400 file.pem
ssh -i file.pem username@a.b.c.d

Reference

man puttygen produces:

puttygen ( keyfile | -t keytype [ -b bits ] )
[ -C new-comment ] [ -P ] [ -q ]
[ -O output-type | -l | -L | -p ]
[ -o output-file ]

How to Convert PPK to PEM File using Command

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

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

Scroll to Top