小编Mat*_*roy的帖子

sshd_config 仍然允许密码认证

我已经调整了我的 sshd_config 文件,其中更改了以下值:

  • 密码认证 否
  • ChallengeResponseAuthentication 否
  • usePAM 否(现在设置为是)

此外,我已经通过执行重新启动sshd服务:sudo service ssh restart。我也重新启动了。

我仍然可以使用用户密码登录。知道我错过了什么吗?

# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime …
Run Code Online (Sandbox Code Playgroud)

ssh password sshd

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

password ×1

ssh ×1

sshd ×1