On running the command ssh-add mykey.ppk it asks for passphrase:

Enter passphrase for mykey.ppk:

But I can see that the key does not have any passphrase and is not encrypted

$ head mykey.ppk
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: imported-openssh-key
Public-Lines: 6

Simply pressing enter at the prompt does not work. How can I add this key to the agent?

PS: I've already heard the sermon on security practices, so you can save your breath :-)


1 Answer 1


ssh-agent does not support private keys in PPK format (PuTTY). You need to convert the key to OpenSSH key using PuTTY gen to be able to add it to your ssh-agent.

Related question on RaspberryPi.

These steps are needed:

  • Load your private key into PuTTYgen
  • Go to Conversions → Export OpenSSH and export your key as mykey.key
  • Add your key to your agent using ssh-add mykey.key.

On Linux, the equivalent puttygen command is:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .