- 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.
Hi, can the ftp username be an email address? I'm switching from another webhost and have existing users that use that format.
ReplyDeleteYou should use the 'visudo' command, rather than vim the file directly
ReplyDeleteWrong both users have access to each other;s accounts
ReplyDeletessh-keygen -f newuser_key
etc