How to enable ssh login as root user in AWS EC2

preview_player
Показать описание
Generally when we try to access server on AWS server as a user 'root'. It will give a message log in as ec2 user. It means you can not able to log in with directly using the root account.

Steps to revert -
If you want to revert this and disable root login so just insert below code into /root/.ssh/authorized_keys file before your key.

no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10"

Subscribe our channel for more tech stuff.
Рекомендации по теме
Комментарии
Автор

hello i am unable to locate the code for message on aws suse linux instance, however i can still receive the message "please login as the user ec2-user rather than the user root suse"

ayyazjamshaid
Автор

I am not able to find authorized_keys file

AnkitSingh-tfcp
Автор

In my case, I do not have permission to edit the file, could you please help

vamost