- 登錄阿里雲控制檯,重置root密碼
- 添加普通用戶
- adduser admin
- passwd xxxx
- whereis sudoers
- chmod -v u+w /etc/sudoers
- vi /etc/sudoers
![](http://static.javashuo.com/static/loading.gif)
- chmod -v u-w /etc/sudoers
- 禁用root
- vi /etc/ssh/sshd_config
- 修改PermitRootLogin 後面的yes 爲 no ,而且去掉前面的註釋符,退出並保存
- service sshd restart
- 修改文件夾權限
chown -R admin:admin admin/ssh