4

I have been trying to connect to a remote server using my private key file from the terminal, but it doesn't seem to work. I don't understand why. Here is how I do it:

$ ssh -i private.ppk oap@10.20.0.11
Enter passphrase for key 'private.ppk':
Enter passphrase for key 'private.ppk':
Enter passphrase for key 'private.ppk':
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

My private key file has 600 mode. I am able to use PuTTY on my Linux box to connect with this private key file. What can be the problem?

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
Fokwa Best
  • 171
  • 6

2 Answers2

11

This is a putty key. It will not work with *nix ssh clients. You need to use PuTTYgen or similar software in order to convert your key to openssh format.

user1700494
  • 1,642
  • 2
  • 12
  • 21
8

openssh and PuTTY are using different key types (but you can convert between them). In PuTTYgen you need to go to Conversions->Export OpenSSH, export your private key and store it as id_rsa.

More on SO or SU.

Jakuje
  • 9,715
  • 2
  • 42
  • 45