debug1:可以继续的身份验证:publickey、password、keyboard-interactive 权限被拒绝,请重试

debug1:可以继续的身份验证:publickey、password、keyboard-interactive 权限被拒绝,请重试

我正在尝试 ssh-copy-id root@linclient 并在输入密码后继续收到此消息。输出:

ssh -vvv root@linclient

在下面:

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

在 sshd.config(下面)中,我尝试了相关设置但没有成功,仍然要求进行密码验证,并在 3 次尝试后失败。

PubKeyAuthentication yes  
AuthorizedKeysFlle %h/.ssh/authorized_keys  
ChallengeResponseAuthentication yes  
UsePAM yes  
PermitRootLogin prohibit-password or PermitRootLogin yes      
PasswordAuthentication yes

但对于任何用户,我复制了密钥当地的成功启动机器,然后无需密码即可进行 ssh。任何其他用户都可以无需密码进行 ssh,只有 root 不允许。

似乎没有密码就无法从远程计算机登录。sshd.配置客户端上的与服务器上的相同。

任何意见都值得赞赏。谢谢!

相关内容