1

I have a .ppk file. I put it to the .ssh folder, but when I try to clone, the server prompts for a password.

I did it on OS X. I convert .ppk to .pem. The result was the same. After that I generate key on my machine. Public key was added to the server. Nothing has changed.

I used command: hg clone ssh://user@hostname localpackage

~/.ssh/config:

Host shortname
    Hostname hostname
    User username
    IdentityFile ~/.ssh/keyname
iPhil676
  • 11
  • 2

1 Answers1

0

You need to convert the key into the openSSH format to work with ssh. The PKK format is format for PuTTY.

Use PuTTYgen to convert to openSSH format:

puttygen ~/.ssh/keyname -O private-openssh -o ~/.ssh/id_rsa

You need to install putty before:

sudo port install putty

Source Ubuntu | Source SO

Community
  • 1
  • 1
Jakuje
  • 24,773
  • 12
  • 69
  • 75
  • Thank you, it worked. But I don't understand why? When I converted it on windows in puttygen and transfer to the mac, it doesn't work. – iPhil676 Feb 22 '16 at 21:12
  • You probably copied it over with wrong permissions or something. You would find from verbose log of `ssh -vvv user@hostname true` – Jakuje Feb 22 '16 at 21:14