是什么原因导致ssh客户端声称密码是一种可能的身份验证,但在拒绝登录之前没有提示用户输入密码



是什么原因导致ssh客户端声称密码是一种可能的身份验证,但在拒绝登录之前没有提示用户输入密码?

例如:

ssh -v test@localhsot
> Authentications that can continue: publickey,password
> Next authentication method: publickey debug1: Trying private key:
> /home/ubuntu/.ssh/id_rsa debug1: Trying private key:
> /home/ubuntu/.ssh/id_dsa debug1: Trying private key:
> /home/ubuntu/.ssh/id_ecdsa debug1: Trying private key:
> /home/ubuntu/.ssh/id_ed25519 debug1: No more authentication methods to
> try. 

test@localhost:权限被拒绝(公钥、密码(。

当服务器关闭密码验证时会发生这种情况

sudo grep -i password /etc/ssh/ssh_config

PasswordAuthentication否ssh-vtest@localhost…

> debug1: Authentications that can continue: publickey,password debug1:
> Next authentication method: publickey debug1: Trying private key:
> /home/ubuntu/.ssh/id_rsa debug1: Trying private key:
> /home/ubuntu/.ssh/id_dsa debug1: Trying private key:
> /home/ubuntu/.ssh/id_ecdsa debug1: Trying private key:
> /home/ubuntu/.ssh/id_ed25519 debug1: No more authentication methods to
sudo vi /etc/ssh/ssh_config
sudo grep -i password /etc/ssh/ssh_config

PasswordAuthentication是enter code here。。。

debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ubuntu/.ssh/id_rsa
debug1: Trying private key: /home/ubuntu/.ssh/id_dsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ecdsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ed25519
debug1: Next authentication method: password
test@localhost's password: 
debug1: Authentication succeeded (password).

欢迎使用Ubuntu 18.04.5 LTS(GNU/Linux x86_64(

相关内容

  • 没有找到相关文章

最新更新