If you’re newbie on Linux platform, please Read Linux To Do First.
To enable root login on CentOS:
su
passwd root
Type a new root password and press Enter. Provide the same root password again for confirmation and press Enter.
If you’re unfamiliar with nano please click here to look at nano’s very simple uses.
Open SSH file to allow authorization.
nano /etc/ssh/sshd_config
Change the authentication method, and add a new line as “PermitRootLogin yes”:
# Authentication: #LoginGraceTime 2m #PermitRootLogin yes PermitRootLogin yes #StrictModes yes #MaxAuthTries 6 #MaxSessions 10
Save and quit the SSH file, then restart SSH service:
service sshd restart
reboot
To enable root login on Ubuntu:
sudo su
sudo passwd root
Provide a new root password and press Enter. Provide the same root password again for confirmation and press Enter.
Open SSH file to allow authorization.
sudo nano /etc/ssh/sshd_config
Change the authentication method, and add a new line as “PermitRootLogin yes”:
# Authentication: LoginGraceTime 120 #PermitRootLogin prohibit-password PermitRootLogin yes StrictModes yes
Save and quit the SSH file, then restart SSH service:
sudo service ssh restart
reboot
After rebooting your server, run a new session on PuTTy as root user.
If the above process does not work, contact with your provider company where you bought the server from. Your provider company’s control panel might has the settings to unlock root login.
Leave A Comment