Aug 21, 2015

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
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
Changing LogLevel of /etc/ssh/sshd_config to VERBOSE doesn't make big difference. It only showed
Failed publickey for [ login name ] from port xxxxx ssh2 Connection closed by
Googling 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)

No comments: