Referenced from: https://jingyan.baidu.com/article/e9fb46e15bfd4f7521f7660f.html
When the Ubuntu 16.04 Server was installed, the installation of OpenSSH was not checked, which prevented SSH from being installed. Here's how Ubuntu 16.04 turns on SSH.
1Ubuntu 16.04 LTS Installation
Tools/Materials
- ubuntu16.04 Server
- Xshell
Method/Step
- 1
Install Openssh-server.
Direct Input Command:
sudo apt-get install Openssh-server
- 2
Enter Y to confirm the download and wait for the installation to complete
- 3
Check if the installation is successful
sudo ps-e |grep ssh
- 4
Open SSH Service
sudo service ssh start
- 5
Log in with Xshell, detect whether the service is open, here is the current Guoke user login.
- 6
Open Root User
sudo passwd root
Enter the password two times in a row. After entering the root user directly to play Su
- 7
Modify SSH to use root login
sudo vi/etc/ssh/sshd_config
Find Permitrootlogin Prohibit-password Line and change to permitrootlogin Yes
- 8
Save and re-start SSH
sudo service ssh restart
- 9
Use the root user login test with Xshell
Ubuntu 16.04 Install SSH