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 xxx.xxx.xxx.xxx
Changing 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.xxx
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)

Comments

Popular posts from this blog

Calling OpenCV functions via Cython from Python 3.X.

Showing CPU/Memory usage on tmux status bar(tmuxのステータスバーにCPUとMemoryの使用状況を表示する)

Subclassing and Signal connect on a same widget crashes PySide application on exit.