Personal Project

Monday, March 7, 2016

Enable root user password to login EC2 on Ubuntu


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!

No comments:

Post a Comment