Since the default user name of Tencent Cloud host ubuntu system is ubuntu, and I don't like to sudo every time I do something, the method to enable root user login
is as follows:
1. Modify the root password
copy code
Enter the password (usually the same as the ubuntu password, easy to remember)
2. Modify ssh configuration
copy code
Find PermitRootLogin and change it to yes
Save and exit and restart the ssh service.
copy code
————————————————————————————————————————————————————————————
is as follows:
1. Modify the root password
- sudo passwd root
2. Modify ssh configuration
- sudo vi /etc/ssh/sshd_config
Save and exit and restart the ssh service.
- sudo service ssh restart