编辑sshd_config配置文件
vim /etc/ssh/sshd_config
PermitRootLogin yes更改为no
重启ssh
systemctl restart sshd
本文介绍如何通过修改sshd_config文件来禁用SSH的root直接登录,提高服务器安全性。操作步骤包括:使用vim编辑器修改配置文件,将PermitRootLogin设置为no,并重启SSH服务。
编辑sshd_config配置文件
vim /etc/ssh/sshd_config
PermitRootLogin yes更改为no
重启ssh
systemctl restart sshd
转载于:https://my.oschina.net/u/3093577/blog/3062899
1245
3760
902
407
959
6484

被折叠的 条评论
为什么被折叠?