Question: Question:
I have Ubuntu 14.04.4 LTS installed on my Sakura VPS.
When I try to ssh to that server,
Permission denied (publickey).
Is displayed and the connection cannot be established.
So, from Sakura's VPS control panel, log in with the VNC console, then connect with ssh, and you can connect this time.
It seems that you can connect with ssh while logged in with the console.
I don't know why.
What does that mean?
Answer: Answer:
SSH / OpenSSH / Keys –Community Help Wiki
By default, the SSH public key is located in your home directory, but if you encrypt your home directory, you will not be able to access your home directory (the public key you entered) until the user logs in in some way, so you can publish your SSH. Key authentication fails.
So it seems that you can work around the problem by moving the SSH public key to a location other than your home directory, for example /etc/ssh/<username>/
. However, there seems to be a story that the home directory is not mounted automatically.
Stopped encrypting home directories on Ubuntu · hnakamur's blog at github