Answer the question
In order to leave comments, you need to log in
Can't connect to ssh via key, what's wrong?
Ubuntu 16.04, trying to set up an ssh key connection. Before that, I configured it on 18.04 without any problems with the same parameters (it works). I saved the keys in /home/user/.ssh/authorized_keys. When connecting in the server logs, the error is:
Authentication refused: bad ownership or modes for directory /home/user
Permissions on the folder and file:
600 /home/user/.ssh/authorized_keys
700 /home/user/.ssh/
755 /home/user /
Owner everywhere user:user
What did I change in the sshd_config config:
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question