Alllow root login on AWS VPS

Login to the box with your key. ie:

ssh -i "/root/your_aws_key.pem" centos@public-ip-address

Define root password

sudo passwd

Switch to user root

su root

Allow root login

vi /etc/ssh/sshd_config

PermitRootLogin yes
PasswordAuthentication yes
ChallengeResponseAuthentication yes

Restart SSH daemon

systemctl restart sshd

Now try to login. If you still get this error: No supported authentication methods available (server sent public key then follow these steps:

vi /root/.ssh/authorized_keys

Remove line that starts with:
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command
Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp