Linux一些用户登录项
1. 禁止Root通过ssh远程登录服务器
修改 /etc/ssh/sshd_config 文件
把 PermitRootLogin yes
修改为 PermitRootLogin no
2. 禁止普通用户通过ssh远程登录服务器
修改 /etc/ssh/sshd_config 文件
添加 DenyUsers user1 user2
3. 添加sudo用户
修改 /etc/sudoers
在 ## Allow root to run any commands anywhere 行后
添加 user ALL=(All) All
4. 普通用户免密码sudo
user ALL=(ALL) NOPASSWD :ALL