Ubuntu sets root password and solves xShell connection problem
Ubuntu 16.04There is no option to set root user password when installing Ubuntu, so it needs to be set later
The default
rootpassword is random, that is, there is a newrootpassword 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:
sudo passwd: modify root password sudo su: switch from ordinary user to root user su arthur: Switch from the root user to the ordinary user arthurUse xShell to connect to ordinary user arthur, but not to root
/etc/ssh/sshd_config file,PermitRootLogin Prohibit-password to PermitRootLogin yesssh service: /etc/init.d/ssh restart or sudo service ssh restartOK!
Above, Enjoy~