After a recent Ubuntu upgrade, one of my frequented remote servers stopped accepting my public key and was prompting me for my password. The password is gross and unwieldy and I was most put-out, I must say. So, I googled the title of this post. Mostly suggestions to check the permissions of various files. All of mine were locked tight to user-only, including my home directory.
Of course, I'd already tried
ssh -vvv to get all the debugging output. Unfortunately, I zoomed in on the following message:
debug1: Next authentication method: publickey debug2: we did not send a packet, disable method
Instead of this one a little further up:
debug1: Skipping ssh-dss key /home/ME/.ssh/keyfiles/ME.key - not in PubkeyAcceptedKeyTypes
Rather than add ssh-dss to the supported types, I just created a new key with
ssh-copy-id later, everything worked.
... except when it didn't. Adding the following to
~/.ssh/config</tt for the offending host worked:
Host refuses-my-agent-keys.jerkass.com PubkeyAcceptedKeyTypes +ssh-dss