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

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

Solution 1:

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.