can't ssh to my droplet with error Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

August 7, 2019 154 views
DigitalOcean

one day, I can't ssh to my droplet with error Permission denied (publickey,gssapi-keyex,gssapi-with-mic), i have tried to re-add ssh key but the issue is not fixed. I need your helps!!!

2 Answers
Kdimitrov August 7, 2019
Accepted Answer

Hi tungnguyenmr,

You would need to enter with your VPS with the password first though. Then edit the /etc/ssh/sshd_config with

PasswordAuthentication yes

Save the file and reload the configuration

service sshd restart

A more in depth answer can be seen here - SSH Key Permission deny

If the issue is still experienced, can you please try to ssh with the verbose command in order to see where the connection fails.

ssh -v  root@xx.xx.xx.xxx

Kind Regards,
Kalin D.

I found similar problem where the 'Add SSH Keys' dialog does not update the '.ssh/authorizedkeys' file for root. This must be done manually. However a separate issue is that the DO Console opens a terminal browser window that has a short copy/past buffer (~128bytes). From the terminal window run nano '.ssh/authorized_keys' for root, and update the rsa key by repeating copy/paste multiple times until the entire rsa key value is copied

Have another answer? Share your knowledge.