Tencent Cloud ubuntu system changed to root login

Today, I reinstalled the idle Tencent Cloud host and replaced it with the ubuntu system. When using putty to install the LNMP environment, it prompted Error: You must be root to run this script, please use root to install lnmp, which roughly means to use the root user to go Log in and install, check it out. Since the default user name of the Tencent Cloud host ubuntu system is ubuntu, it is necessary to enable root user login.
Methods as below:

Step Method
Modify root password Execute the command sudo passwd root
Enter the password It can be the same as the ubuntu password, or it can be modified (the password will let you enter it twice)
Modify ssh configuration Execute the command sudo vi /etc/ssh/sshd_config
Modify PermitRootLogin After entering the ssh configuration interface, find PermitRootLogin, change it to yes, and save (press i to enter the editing mode, and exit after editing, :w save the current file, :q exit)
Restart the ssh service Execute the command sudo service ssh restart

Recommended Posts

Tencent Cloud ubuntu system changed to root login
Tencent Cloud Ubuntu 18.04 open root login
Enable root user remote login on ubuntu system
Aliyun Ubuntu online migration to Tencent cloud cvm
Experience Ubuntu system CVM with free Tencent Cloud server
[Sharp Tools]-Ubuntu 18.04 system changed to Manjaro
How to extend the root directory of LVM under Ubuntu system
How to open root account in Ubuntu20.04
Obtain Root permission when remote Ubuntu system
How to use dpkg command in Ubuntu system
How to open the ubuntu system in win10
Note record | Ubuntu16.04 set default root user login
[Practice] How to install python3.6 on Ubuntu system
Wsl sets the default account to root (ubuntu18.04)
Configure Wolfram Engine on Tencent Cloud ubuntu server
How to configure /var/log/messages in Ubuntu system log
Install Leanote on Ubuntu18 to build cloud notes
How to change root user password on Ubuntu
Ubuntu system installation
ubuntu cycle login
Modify the default root password of the Ubuntu operating system
How to modify time zone and time in ubuntu system
Complete steps to realize face recognition login in Ubuntu
About Tencent Cloud ubuntu server Tomcat access slow problem
How to install theano and keras on ubuntu system
How to repair a damaged Ubuntu system without reinstalling
Teach you how to install Ubuntu system enhancement tools