[Linux]Ubuntu set root password and solve xShell connection problem

Original article http://blog.csdn.net/humanking7/https://blog.csdn.net/humanking7/article/details/94981116

Article Directory

Ubuntu sets root password and solves xShell connection problem

0. surroundings#

1. Ubuntu set root password#

There is no option to set root user password when installing Ubuntu, so it needs to be set later

The default root password is random, that is, there is a new root password every time you boot

Enter the command sudo passwd in the terminal, and then enter the password of the current user, which needs to be confirmed twice.
You can also enter the command sudo passwd root to set.

qfx-x60s:~$ sudo passwd
Enter new UNIX password:
Re-enter the new UNIX password:
passwd:Password updated successfully

Other commands:

2. Solve the problem that xShell cannot directly connect to ubuntu using the root account#

Use xShell to connect to ordinary user arthur, but not to root

  1. Modify the /etc/ssh/sshd_config file,
    Modify the line of PermitRootLogin Prohibit-password to PermitRootLogin yes
  2. Restart ssh service: /etc/init.d/ssh restart or sudo service ssh restart

OK!
Above, Enjoy~

Recommended Posts

[Linux]Ubuntu set root password and solve xShell connection problem
CentOS7 and Docker configuration Chinese character set problem