- useradd to add a new user account
- Create password for the new user, add it to the sudoer list
- Enable PasswordAuthentication in /etc/ssh/sshd_conifg
- Change root password
- Lock ec2-user: passwd -l ec2-user
- Delete /etc/sudoers.d/xx
- Now the ec2-user has no root permission
Reference:
http://blog.braini.ac/?p=73
No comments:
Post a Comment