- Enable root user password login on AMAZON AWS EC2 Ubuntu
- Enable root login on AWS UBUNTU VPS
Create a password for the root user:
sudo passwd root
Edit your SSHd config to allow password based logins:
sudo nano -w /etc/ssh/sshd_config
Add the following line to /etc/ssh/sshd_config:
PasswordAuthentication yes
Copy your authorized SSH keys if you want to log in via keys as well:
sudo mkdir /root/.ssh
sudo cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/
Reload your SSHd config:
sudo reload ssh
or
sudo service ssh restart
Now you can login as root!