SUDDEN "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)." !!
On Google Compute Engine, my server suddenly ceased to respond "gcloud compute ssh" command 3 days ago.
It only shows
Now, I just found the home directory(~/) also has to have permission 700.
It's embarrassing I do not remember how the permission changed in the first place, but I hope this will help somebody from spending three very useless days.
Conclusion, when you suddenly cannot connect to ssh,
CHECK PERMISSION!! (including home directory)
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).After making new account, I looked into the /var/log/secure, but it only said
Connection closed by xxx.xxx.xxx.xxxChanging LogLevel of /etc/ssh/sshd_config to VERBOSE doesn't make big difference. It only showed
Failed publickey for [ login name ] from xxx.xxx.xxx.xxx port xxxxx ssh2 Connection closed by xxx.xxx.xxx.xxxGoogling about ssh login problems, many blogs tell to doubt permissions of ssh files and directories, such as ~/.ssh and ~/.ssh/authorized_keys, but they seemed to have proper permissions.
Now, I just found the home directory(~/) also has to have permission 700.
It's embarrassing I do not remember how the permission changed in the first place, but I hope this will help somebody from spending three very useless days.
Conclusion, when you suddenly cannot connect to ssh,
CHECK PERMISSION!! (including home directory)
Comments