Convert PPK to id_rsa in Linux

less than 1 minute read

Putty is an SSH client that’s mostly used in Windows. Linux usually has an SSH client built in.

Unfortunately Putty uses its own key format which is not compatible with OpenSSH’s key format.

This brief tutorial will show you how to easily convert Putty’s format (private.ppk) to OpenSSH’s format (id_rsa) and vice versa.

If you have any questions: please let me know in the comments!

Convert PPK to id_rsa

  1. Open a terminal
  2. Install puttygen (part of the putty package):
    sudo apt-get update
    sudo apt-get install putty
    
  3. Convert private.ppk to id_rsa:
    puttygen private.ppk -O private-openssh -o id_rsa
    

    This takes private.ppk and converts it to an OpenSSH private key as id_rsa

Convert id_rsa to PPK

  1. Open a terminal
  2. Install puttygen (part of the putty package):
    sudo apt-get update
    sudo apt-get install putty
    
  3. Convert id_rsa to private.ppk:
    puttygen id_rsa -O private -o private.ppk
    

    This takes id_rsa and converts it to a Putty private key as private.ppk

Updated:

Leave a comment