Ubuntu settings allow root login

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
  1. sudo passwd root
copy code
Enter the password (usually the same as the ubuntu password, easy to remember)
Modify root password.png 
2. Modify ssh configuration
  1. sudo vi /etc/ssh/sshd_config
copy code
Find PermitRootLogin and change it to yes
ssh configuration.png 

Save and exit and restart the ssh service.
  1. sudo service ssh  restart
copy code
————————————————————————————————————————————————————————————

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325649797&siteId=291194637