安装的时候勾选了允许 root 登录,现在想关掉,尝试如下操作不起作用:
将/etc/ssh/sshd_config 的 PermitRootLogin 设置为 no
然后 systemctl restart sshd
实测不起作用,但网上能找到的都是这种方法