![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-32-1024x338.png)
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.
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-26-1024x409.png)
If not, you can install it through sudo apt install openssh-client.
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-27-1024x295.png)
if you need to open SSH service on your own machine, you need to install openssh-server.
Similarly, use apt to install openssh-server.
ylspirit@ubuntu:~$ sudo apt install openssh-server
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-28-1024x399.png)
Start the openssh-server service. The service name is sshd.
You can view the command startup through PS command.
ylspirit@ubuntu:~$ service sshd start
ylspirit@ubuntu:~$ ps -ef | grep sshd
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-29-1024x192.png)
Here, other computer can connect to the local machine through SSH.
First, look at the local IP address.
ylspirit@ubuntu:~$ ifconfig
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-30-1024x282.png)
Then, on another computer, connect to 192.168.159.131 through SSH command.
➜ ~ ssh ylspirit@192.168.159.131
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-31-1024x381.png)
OK, the installation and use of Ubuntu SSH service is finished.