SSH'ing to remote server with a PPK key fails


Hi there,

The title says it all. SSH'ing to the server with putty on Windows works fine but when I try to login from the terminal, I got two problems.

First, a new window pops-up and asks to enter the SSH key's password. I enter it and then the window pops-up again.

Then, I get the following error :

Permission denied (publickey, gssapi-with-mic)

Does anyone know what's my problem?

Thanks in advance!
Last edited:
that Terminal asks for a password for the password of the SSH key shouldn't be considered a problem ... that just means that you specified that the SSH key should be generated with encryption.

As the the other problem, I'll need to see a log of what's happening, so add -vvv to the command just after the ssh to see what's the reason for the error.
Thank you for your quick reply, Bjarne but I've found a solution while my post was being moderated.

If someone has the same problem :

Convert a puTTy private key (.ppk) to and OpenSSH (.ssh) file

1. Part 1 :: On Windows
  • Download PuTTygen.
  • Open it and load your .ppk file
  • Open conversions and export the key as an OpenSSH key

2. Part 2 :: On Mac OS X
  • Open the Terminal
  • $ chmod 600 [/path/to/key/rsa.ssh]
  • $ ssh root@remotehost -p [21|22] -i [/path/to/key/rsa.ssh]

Last edited: