Convert id_rsa to ppk and ppk to id_rsa in Linux

PPK (Putty Private Key) files are private key files used by Putty which is an SSH client that is mostly used in Windows.

This guide will show you how to convert private key files from Putty’s format to OpenSSH, and vice versa.

Convert id_rsa to ppk

To convert id_rsa file to private.ppk:

# install puttygen which is part of the putty package
sudo apt-get update
sudo apt-get install putty

# convert private.ppk to id_rsa
puttygen id_rsa -O private -o private.ppk

Convert ppk to id_rsa

To convert private.ppk file to id_rsa:

# install puttygen which is part of the putty package
sudo apt-get update
sudo apt-get install putty

# convert private.ppk to id_rsa
puttygen private.ppk -O private-openssh -o id_rsa