I am trying to ssh-copy-id root@linclient and continue to get this message after entering the password. Output of:
ssh -vvv root@linclient
is below:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
root@linclient: Permission denied (publickey, password,keyboard-interactive).
/var/log/auth.log:
Jun 3 13:03:28 liclient sshd[10337]: Received signal 15; terminating.
Jun 3 13:03:28 liclient sshd[10454]: Server listening on :: port 22.
Jun 3 13:03:28 liclient sshd[10454]: Server listening on 192.168.0.120 port 22.
Jun 3 13:03:31 liclient sshd[10457]: Connection from 192.168.0.103 port 55298 on 192.168.0.120 port 22
Jun 3 13:03:31 liclient sshd[10457]: Failed publickey for root from 192.168.0.103 port 55298 ssh2: RSA SHA256:J7Gm0ZS6icNOdQ5
In the sshd.config (below) the relevant settings I played with and no success still asking for password authentication and fails after 3 attempts.
PubKeyAuthentication yes
AuthorizedKeysFlle %h/.ssh/authorized_keys
ChallengeResponseAuthentication yes
UsePAM yes
PermitRootLogin prohibit-password or PermitRootLogin yes
PasswordAuthentication yes
But for any user, I copied the key on the local machine with success and then ssh without password. Any other users can ssh without password, the only root is not allowed.
It seems that the root cannot log in without password from remote machines. The sshd.config on the clients are identical with the one on the server.
Any input is appreciated. Thanks!
0 Answers