添加一个新用户
- 
添加新用户
useradd cc
 - 
设置新用户密码
passwd cc
 
修改/etc/sudoers文件
找到## Allow root to run any commands anywhere
在root ALL=(ALL) ALL下方添加语句cc ALL=(ALL) ALL

此文件为readonly文件,保存使用
wq!命令
修改/etc/ssh/sshd_config文件
找到PermitRootLogin yes修改为PermitRootLogin no
保存之后执行service sshd restart命令即可