Secure Shell

Working with ssh keys

Convert PPK (PuTTY key) to OpenSSH format

You might receive from your peer private key in PPK format, which seems it does not work in OpenSSH (command-line ssh). The client will be asking for the passphrase, because of OpenSSH bug.

$ ssh -i mykey.ppk example.com
Enter passphrase for mykey.ppk:

You need to convert the key to OpenSSH format using PuTTYgen (command-line version):

puttygen mykey.ppk -o mykey.key -O private-openssh

Or in GUI version:

  • Open PuttyGen
  • Click Load
  • Load your private key
  • Go to Conversions->Export OpenSSH and export your private key
  • Copy your private key to ~/.ssh/id_rsa

Source: SO answer, Unix SE answer


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow