The default user name of the Ubuntu system is Ubuntu, and the root account and password are not set by default during the installation process. If you do not like to do something every time, you need to sudo, and enable the root user to log in. The operation method is as follows:

1. Change the password of user root (the root user does not have a password by default, so it cannot be used. To use root, you need to set a password for root.

Sudo passwd root Enter the password (usually the same as the Ubuntu password for easy memorization)

2. Modify the SSH configuration

Sudo vi /etc/ssh/sshd_config PermitRootLogin Change the value to yes

3. Save the Settings, exit, and restart the SSH service.

Sudo service SSH restart or systemctl restart sshd.service

4. Verify whether the root permission can be used for remote login