Enable Root Login in

How To Enable Root Login In SSH Config 

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

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

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 another port number. All the server-side configuration needs to be changed in the sshd_config.

Step 1: Enable login in ssh config file

PermitRootLogin yes

Check Out: How To Install Rancher Container Orchestration Server In Linux

Step 2: Now enable password authentication for users.

PasswordAuthentication yes

Step 3: if u are still not able to login using root user, So add these lines in the 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. ssh allow root login allow user to ssh

LEAVE A REPLY

Please enter your comment!
Please enter your name here