欢迎 on it road

解决方法

虽然这似乎是一个有风险的要求,但有时在私有的开发环境中这会派上用场。
openssh 还为我们提供了在执行 ssh 时为用户设置空密码的选项。

从 sshd_config 的手册页:

# man sshd_config
...
     PermitEmptyPasswords
             When password authentication is allowed, it specifies whether the server allows login to accounts with empty password strings. The default is no.

所以默认情况下,ssh 不允许用户使用空密码登录。
但是如果我们在配置文件/etc/ssh/sshd_config中将PermitEmptyPasswords参数值设置为“yes”,用户就可以用空密码登录了。

# vi /etc/ssh/sshd_config
PermitEmptyPasswords yes

如果在配置文件中散列参数,请确保取消散列参数。

如何在 Linux 中允许 ssh 使用空密码

问题

如何让空密码的用户登录Linux系统?

日期:2020-09-17 00:13:08 来源:oir作者:oir