CPLICENSE

How to enbale root user on linux server

How to enable root user on linux server

login to your server with user name provided by your hosting company, usually it’s ubuntu or linux

After success full login use this command to set password for root

sudo passwd -u root

After that you need to enter desired password for root user

At this stage you can login via root user but not with ssh for enable root user login via ssh you should do one more step

Use this command to open ssh server config file

nano /etc/ssh/sshd_config

After that find this line

PermitRootLogin without-password
 
And change it to
PermitRootLogin yes
 
Then restart the ssh server with this command
 
systemctl restart sshd
 
now you can login to root user via ssh