0

I am trying to ssh into a server from cygwin on Windows 7. I created public/private keys using ssh-keygen, and didn't add a passphrase. I then added them to the authorized_keys on the server. When I try to ssh, I get asked for a passphrase.

I used ssh -vvv, and I can see that the public key is accepted, and that my "empty" passphrase file doesn't work.

I also don't have any problems logging in when I ssh from my Ubuntu machine.

Finally, just for the sake of completeness, I tried making a new key pair, and adding a passphrase. When I get asked for it, it also fails to decrypt my private key.

Has anyone encountered something similar? Know what to do?

  • Please edit the question to include the exact ssh command that you're running and the output of ssh -vvv. You can obscure the remote user/hostname if you like. – Kenster Aug 19 '15 at 15:05
1

It turns out to be, as often is the case, something remarkably stupid. I manually added the name of my key file in my config file, and gave the public key - like this.

Host server
    HostName server.address
    User myuser
    IdentityFile ~/.ssh/id_rsa.pub

Instead of

IdentityFile ~/.ssh/id_rsa

Which, of course, works. (I know this line isn't necessary, because it's the default key name - I had been using a different key name)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.