禁止root用户直接登陆

版权声明:一家之言,看完就忘了吧 https://blog.csdn.net/leisure_life/article/details/82897183
vi /etc/ssh/sshd_config

查找“#PermitRootLogin yes”,将前面的“#”去掉,短尾“Yes”改为“No”,并保存文件。

重启sshd服务生效。

service sshd restart

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/leisure_life/article/details/82897183