Answer the question
In order to leave comments, you need to log in
Problem with SSH?
Hello!
When I try to connect using ssh key I get an error server refused our key
. Although when connecting with a password, everything goes fine. Public keys are stored on the path /home/user_folder/.ssh in the authorized_keys file, in the sshd_config file such parameters are
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys /etc/ssh/authorized_keys
. Answer the question
In order to leave comments, you need to log in
Look in the logs (/var/log/secure | /var/log/auth),
you can also run "ssh -v" on the client.
chmod 400 ~/.ssh/authorized_keys
If the public key is correct, and in the logs the server swears at too loose rights to the file.
And how did you put the keys on the server? There is a glitch with how the key itself looks in the authorized_keys file. It needs to be edited a little or something ... Remove unnecessary information. And after ssh-rsa, you can remove the line feed ... Preferably, all this should be on one line. I don't know why that is, but there is such a thing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question