Archive

Posts Tagged ‘enable’

Enable root user password login on EC2 Ubuntu

March 22nd, 2012 16 comments

Even though it’s not recommended, sometimes it’s easier to just log in as root. Here’s how to enable the root user login on your Ubuntu based EC2 instance:

 

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

Now you can login as root!

Categories: Uncategorized Tags: , , , , ,