禁止root远程登录centos(启用sudo)
摘要:1、添加sudo用户执行visudo命令,找到:rootALL=(ALL)ALL在下面增加:(注意,qianyunlai是Linux新增的一...
1、添加sudo用户
执行visudo命令,找到:
root ALL=(ALL) ALL
在下面增加:(注意,qianyunlai 是Linux新增的一个普通用户)
qianyunlai ALL=(ALL) ALL
2、禁止root用户登录
编辑/etc/ssh/sshd_config,将
PermitRootLogin yes
改为
PermitRootLogin no
重启sshd:
service sshd reload
【禁止root远程登录centos(启用sudo)】相关文章:
★ 使用ntp从时间同步服务器更新centos系统时间的方法
★ 红帽子Red Hat Linux 9 光盘启动安装过程图解
★ haproxy+keepalived负载均衡之主备切换(centos)