Ubuntu sets root password and solves xShell connection problem
Ubuntu 16.04
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 newroot
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:
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 arthur
Use xShell
to connect to ordinary user arthur
, but not to root
/etc/ssh/sshd_config
file,PermitRootLogin Prohibit-password
to PermitRootLogin yes
ssh
service: /etc/init.d/ssh restart
or sudo service ssh restart
OK!
Above, Enjoy~