密码验证问题 SSH - 无法禁用

密码验证问题 SSH - 无法禁用

我刚刚安装了 Ubuntu 22.04.3 LTS。像我多年来所做的那样设置 SSH。

在 /etc/ssh/ssh_config 中更改:

PasswordAuthentication no
PubkeyAuthentication yes
ChallengeResponseAuthentication no

重启服务systemctl restart sshd

我仍然可以通过密码登录。

似乎 /etc/ssh/sshd_config.d/50-cloud-init.conf
包含一行PasswordAuthenticaion yes 覆盖 ssh_config 的行

在我看来,这是 Ubuntu 在此版本中引入的一个安全漏洞,因为它打破了多年来在 sshd_config 中禁用密码验证的传统和标准做法。我可以想象 releaseupdate 可能会更改设置或由脚本强制执行的标准配置,并被此更改破坏。

发生这种变化有什么原因吗?或者这只是此版本的一个错误?

谢谢

相关内容