root enable in linux

How To Enable Root Login In SSH Config 

We do disable root login on the server from ssh config file because of security reasons. So if you want to enable root login in ssh config., you must follow the below settings.

you can use ssh key to login the server then switch to root user. we don’t give root user access to anyone but we can give server access using ssh key to login. 

Check Out : SSH Password less login Using SSH Keygen In Linux

By default, ssh installed on the machine. you can also change the ssh port number default 22 to other port number. All the server side configuration need to be change in sshd_config.

Step 1 : Enable login in ssh config file

PermitRootLogin yes

Step 2 : Now enable password authentication for user.

PasswordAuthentication yes

Step 3 : if u are till not able to login using root user, So add these line in sshd_config file.

AllowUsers root

Check Out : SSH Password less login Using SSH Keygen In Linux

Step 4 : restart the ssh service to take the effects.

systemctl restart sshd

You’re done.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

15 − seven =