我按照https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets 上的第六步进行操作,但是当我尝试连接到服务器时仍然收到密码提示使用来自其他没有私钥的机器的 ssh。
故障排除想法?谢谢
这是正常的行为。系统将提示您输入密码,但如果PermitRootLogin without-password
已设置,则密码无效。如果您根本不想被提示输入密码,请在您的sshd_config
:
PasswordAuthentication no
Run Code Online (Sandbox Code Playgroud)
如果您只想拒绝它root
,请尝试:
Match User root
PasswordAuthentication no
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
12928 次 |
最近记录: |