首先打開/etc/ssh/sshd.config文件
vim /etc/ssh/sshd_config
找到配置
#PermitRootLogin yes
將其修改為
PermitRootLogin no
如下圖所示:
重啟sshd服務(wù),命令如下:
systemctl restart sshd.service
推薦教程:centos教程
首先打開/etc/ssh/sshd.config文件
vim /etc/ssh/sshd_config
找到配置
#PermitRootLogin yes
將其修改為
PermitRootLogin no
如下圖所示:
重啟sshd服務(wù),命令如下:
systemctl restart sshd.service
推薦教程:centos教程