Search code examples
windowssshssh-keysssh-keygen

Windows SSH asking for passphrase


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?


Solution

  • 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.