Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I'm trying to enable root login for my EC2 instances. I know I could use su or sudo, but I need to be able to ssh'ing into my server as root because the Jenkins EC2-Plugin requires root access.

I already found some solutions during my web search but they all didn't work:

PermitRootLogin in /etc/ssh/sshd_config

Copy authorized_keys to root's .ssh-Folder

1 Answer

0 votes
by (18.2k points)

Try the following steps:

run the following commands:

sudo -s

vi /root/.ssh/authorized_keys

Go to the sshd_config file using the following command and delete the beginning of the file until you get to "ssh-rsa" text.

vi /etc/ssh/sshd_config

Set PermitRopotLogin variable to PermitRootLogin without-password then use the following command:

sudo /etc/init.d/sshd restart

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Jul 5, 2019 in AWS by Amyra (12.9k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...