"Permission denied (publickey)." after update of Cygwin

11

1

I updated Cygwin and I can no longer SSH into any remote machines.

Here is the relevant debug output from SSH; What is happening?

debug1: Server host key: ssh-rsa SHA256:VTUSWVnLWQ6ohJ0hZ7vcswPKnuBsXSqtqH054jWxMAA
debug1: Host 'xxx.yyy.zz' is known and matches the RSA host key.
debug1: Found key in /home/nifle/.ssh/known_hosts:5
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/nifle/.ssh/id_rsa
debug1: Skipping ssh-dss key /home/nifle/.ssh/id_dsa for not in PubkeyAcceptedKeyTypes
debug1: No more authentication methods to try.
Permission denied (publickey).

Nifle

Posted 2015-08-31T12:14:30.770

Reputation: 31 337

Answers

14

The problem was that after the cygwin update I had OpenSSH v7 and it no longer thought that my old SSH key was secure enough.

You can read in the debug info above that it’s a ssh-dss key.

The simple fix was to add this PubkeyAcceptedKeyTypes ssh-dss to ~/.ssh/config

The better solution would of course be to generate a new secure key-pair.

Nifle

Posted 2015-08-31T12:14:30.770

Reputation: 31 337

Very nice catch of a “gotcha!” – JakeGould – 2015-08-31T12:26:40.260

1Did you mean OpenSSH v7? I'm pretty sure OpenSSL is still on v1 – redreinard – 2015-09-01T22:00:28.767