What is SSH

SSH (Secure shell) — it is a secure network protocol that allows you to remotely control the operating system and tunnel a TCP connection. For authentication in SSH, a protocol is used based on the RSA or DSA digital signature algorithms. However, password authentication is also allowed for backward compatibility with Telnet. And for backward compatibility with rlogin, even by the host ip-address.

The main functions of SSH:

  1. remote launch of programs and execution of commands on the server via the command line
  2. port forwarding and transmission of encrypted traffic between ports of different machines
  3. data transmission over a secure connection. These can be videos, images, mail and other files
  4. file compression for easy data transfer

An SSH connection consists of 2 components: an SSH server and an SSH client. By default, the client connects to the server on port 22. There are different numbers of ssh clients and servers for different operating systems.
An SSH server is a program that establishes communication and authenticates with a user's device. It is installed on the server itself. To install ssh server on ubuntu you can run the following command

 apt-get install openssh-server
An SSH client is used to log into a remote machine and send commands to it. It is installed on the device from which the user wants to connect to the server. On Unix operating systems, the client for OpenSSH is installed by default. To check that the ssh client is installed, you can run
 apt-cache policy openssh-client
 openssh-client:
 Installed: 1:7.6p1-4ubuntu0.3