Log in as root

If you get an error saying that root login is not allow you need to do the following

Log in as ec2-user and then

sudo -s
vi /root/.ssh/authorized_keys

Delete the lines at the begining of the file that say COMMAND… until you get to the words ssh-rsa.

If required, edit sshd_config to set variable PermitRootLogin to PermitRootLogin without-password (without quotes) and restart sshd.

vi /etc/ssh/sshd_config
sudo /etc/init.d/sshd restart