1

I generated a public/private SSH key pair (with no passphrase) using Puttygen on a Windows machine, and copied the public key up to my Linux server. When I use the private key in Putty everything works as expected. However, when I try to ssh from the Windows command line, I get prompted for a passphrase. Since there isn't one, I can't login.

ssh -T myserver.com
Enter passphrase for key 'C:\Users\myusername\.ssh\private.ppk':
Permission denied (publickey,gssapi-with-mic,password).

Why am I being prompted for a passphrase for a key that doesn't have one?

scott80109
  • 361
  • 6
  • 25
  • Here is the answer: http://stackoverflow.com/questions/9631246/ssh-key-passphrase-works-in-windows-but-not-in-linux?rq=1 – aet Sep 25 '13 at 00:16
  • The problem is not on the Linux side. The problem is on the Windows side. My key works fine when used through Putty. It asks for the passphrase only when I attempt to SSH via the cmd prompt. – scott80109 Sep 25 '13 at 00:24
  • The command line ssh, is that putty? If its not, it could have the same issue, that is, not recognizing the ppk format. – aet Sep 25 '13 at 00:25
  • See my answer below. The command line SSH was through msysgit, which was incorrectly using Open SSH. – scott80109 Sep 26 '13 at 19:25

2 Answers2

3

The problem was that msysgit was installed to use OpenSSH. Since the kwys were generated in Puttygen, they weren't compatible. I changed the GIT_SSH environment variable to point to Plink.exe, and it works fine now.

scott80109
  • 361
  • 6
  • 25
3

And just to mention if anyone uses MINGW in order to ssh he needs to select OPENSSH at puttygen.

If you already have generated a pair with GIT_SSH protocol then go to puttygen and: Load -> Conversions -> export OpenSSH key

stelios
  • 2,679
  • 5
  • 31
  • 41