- Open a putty session, log in with the default user, ec2-user
- sudo su
- useradd new_user_name
- passwd new_user_name, give a password for the new user
- vim /etc/sudoers, insert line "new_user_name ALL = NOPASSWD: ALL" at the end of the file
- cd /home/new_user_name
- mkdir .ssh
- cp ../ec2-user/.ssh/authorized_keys .ssh/authorized_keys
- chown -R new_user_name:new_user_name .ssh
- chmod 700 .ssh
- chmod 600 .ssh/*
Open another putty session and log in with the same private key you use for ec2-user.