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 necessary, you can enable root user login in the settings. The specific operation steps are as follows:
1. Use the ubuntu account to log in to the lightweight application server.
2. Execute the following command to set the root password.
sudo passwd root
3. Enter the root password and press Enter .
4. Repeat the root password and press Enter . If the following information is returned, it means that the root password is set successfully.
passwd: password updated successfully
5. Execute the following command to open sshd_config
the configuration file.
sudo vi /etc/ssh/sshd_config
6.
Press i to switch to edit mode, find #Authentication
and PermitRootLogin
change the parameter to yes
. If PermitRootLogin
the parameter is commented, please remove the comment symbol ( ) in the first line #
. As shown below:
7. Find #Authentication
and PasswordAuthentication
change the parameter to yes. As shown below:
illustrate
If sshd_config
there is no such configuration item in the configuration file, PasswordAuthentication yes
just add the item.
8. Press Esc , type :wq , save the file and return.
9. Execute the following command to restart the ssh service.
sudo service ssh restart
10. Refer to Logging In to a Linux Instance Using Remote Login Software , and use the following information to log in to the Ubuntu lightweight application server:
Username: root
Login password : the password set in step 2