How to Convert a Putty PPK to a Linux private and public key pair

Submitted by rmiddle on Fri, 03/24/2017 - 18:00

To convert a ppk file to something ssh can use.


1) Install putty tools.


Install a putty RPM from either RPMForge or nux-dextop repositories.

To install from Nux Dextop Repository

# Install Nux Dextop Repo to RHEL 6/CentOS 6/ScientificLinux 6 #
yum -y install epel-release && rpm -Uvh

# Install Nux Dextop Repo to RHEL 7/CentOS 7/ScientificLinux 7 #
yum -y install epel-release && rpm -Uvh


Then install Putty

yum -y install putty

Debian / Ubuntu: 

apt-get install putty-tools

2) Run the following pair of command.

puttygen keyfile.ppk -o -O public-openssh
puttygen keyfile.ppk -o id_rsa -O private-openssh


Where "keyfile.ppk" is the key file to convert, "" is the public key file, and "id_rsa" is the private key file. PuTTY stores both the private and public keys in the .ppk file, which is why you use the same file to convert both keys. You can now use you new keys pairs with OpenSSH.