您的位置 首页 centos

centos怎么禁止root用户直接登录

首先打开/etc/ssh/sshd.config文件

vim /etc/ssh/sshd_config

找到配置

#PermitRootLogin yes

将其修改为

PermitRootLogin no

如下图所示:

9a5d0f9f5cf8c7ed448f1227a0142de.png

重启sshd服务,命令如下:

systemctl restart sshd.service

f79df46c82b4f57c9c03aa13b667788.png

推荐教程:centos教程

文章来源:智云一二三科技

文章标题:centos怎么禁止root用户直接登录

文章地址:https://www.zhihuclub.com/10632.shtml

关于作者: 智云科技

热门文章

网站地图