Open SSH service in Ubuntu

SSH is divided into client (openssh-client) and server (openssh-server).
If you just want to log in to SSH of other machines, you only need to install openssh-client;
Openssh-client is installed by default on Ubuntu system.

If not, you can install it through sudo apt install openssh-client.

if you need to open SSH service on your own machine, you need to install openssh-server.
Similarly, use apt to install openssh-server.
[email protected]:~$ sudo apt install openssh-server

Start the openssh-server service. The service name is sshd.
You can view the command startup through PS command.
[email protected]:~$ service sshd start
[email protected]:~$ ps -ef | grep sshd

Here, other computer can connect to the local machine through SSH.
First, look at the local IP address.
[email protected]:~$ ifconfig

Then, on another computer, connect to 192.168.159.131 through SSH command.
➜ ~ ssh [email protected]

OK, the installation and use of Ubuntu SSH service is finished.