The newly created Tencent Cloud ubuntu system server, the default login user name is ubuntu, so many users want to use the super administrator root user to operate their own servers, but the root user is forbidden to log in by default. How to enable the root user? ? The operation method is as follows:
1、 Use ubuntu user to log in to the system;
2、 Edit the /etc/ssh/sshd_config file;
sudo vim /etc/ssh/sshd_config
Find the configuration parameter: PermitRootLogin
Modify the value behind this parameter to yes;
Press "esc" :wq Enter, save and exit;
3、 Set a password for the root user;
sudo passwd root
Enter the password twice;
(After setting the password for the root user, you can already log in to the system from vnc as the root user)
4、 Restart ssh service
sudo systemctl restart ssh
Then log in remotely as root user for testing;
Recommended Posts