Amazon EC2 Root login
Refer to the following to set root login:
sudo -s (to become root)vi /root/.ssh/authorized_keys
Delete the lines at the begining of the file until you get to the words ssh-rsa
.
vi /etc/ssh/sshd_config
Set the variable PermitRootLogin
to PermitRootLogin without-password
(without quotes)
sudo /etc/init.d/sshd restart
You need to edit file : /etc/ssh/sshd_configand restart ssh service .
If you want to login using keys change as below :
PermitRootLogin yesRSAAuthentication yes
If you want to login using password , change as below :
PermitRootLogin yesPasswordAuthentication yes
edit /etc/ssh/sshd_config
- Comment out the line "PermitRootLogin"
- Comment out the line "PasswordAuthentication no"
Then restart the ssh service
/sbin/service sshd restart