0 votes
1 view
in AWS by (8.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.5k 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

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...