2

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
AAAAB3NzaC1yc2EAAAADAQABAAABAQC8V+PLuklXrfFDZ9GNluXB/L8foOzaEp5s
jwaOL1iAxCKDWWsfsmyj9MbhV5r4Z6VGo/0T

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 :-)

9

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.