Answer to Question 1
Here's what I did on a Ubuntu EC2
:
A) Login as root using the keypairs
B) Setup the necessary users and their passwords with
# sudo adduser USERNAME
# sudo passwd USERNAME
C) Edit /etc/ssh/sshd_config
setting
For a valid user to login with no key
PasswordAuthentication yes
Also want root to login also with no key
PermitRootLogin yes
D) Restart the ssh
daemon with
# sudo service ssh restart
just change ssh to sshd if you are using centOS
Now you can login into your ec2
instance without key pairs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…