Ubuntu provides OpenSSH (OpenBSD Secure Shell) in it universe repositories, which is a suite of security-related network- Level utilities based on the SSH protocol.
1. To install it, open Terminal (ctrl+alt+t) or log in Ubuntu server and Run command:
sudo apt-get install Openssh-server
2. After this, you should has the SSH service enabled in your system, and you may check the IT status by running command:
sudo service SSH status
3. Some settings (e.g., the listening port, and root login permission) by editing the configuration file VI a command:
sudo nano/etc/ssh/sshd_config
On Ubuntu desktop, gedit
instead of nano
: Add the command in file
Permitrootlogin Yes Strictmodes Yes
Finally apply the changes by restarting or reloading SSH:
sudo service ssh restart
The above content is completely pirated from:
http://ubuntuhandbook.org/index.php/2016/04/enable-ssh-ubuntu-16-04-lts/
Here solemnly say, piracy to steal a full set, hahaha ~ ~ ~
Because you are not accustomed to using non-root users, enable the root account method directly:
1. Change the root password:
sudo passwd root
Enter the root user password two times
2. Create/etc/lightdm/lightdm.conf
Vi/ect/lightdm/lightdm.conf
Enter the content:
[Seatdefaults]greeter-session=unity-greeteruser-session=ubuntugreeter-show-manual-login=true
3. Restart the system
4, log on to the desktop with root, will pop up read/root/.profile error: Mesg:ttyname failed: improper operation of the device IOCTL information, the solution:
Add MESG N in the/root/.profile file
Replace with tty-s && mesg n
5, restart.
Reference article:
http://www.configserverfirewall.com/ubuntu-linux/enable-ubuntu-desktop-root-login/
Ubuntu17 root SSH