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