Question

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

Posted August 7, 2019 3k 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!!!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

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

Submit an Answer