Supondo acesso SSH:
# Turn on password authentication
sudo sed -i 's/^PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
# Reload SSHd configuration
sudo service sshd reload
# Set a password for the ec2-user
sudo passwd ec2-user