Setup OpenSSH Server on Ubuntu Linux | Guide

Establishing an SSH Server on Ubuntu
The process of configuring an SSH server on Ubuntu is remarkably straightforward. OpenSSH is the commonly selected server software for this purpose.
Installation is initiated through a single command executed within a terminal window:
sudo apt-get install ssh
Verifying SSH Server Functionality
Following installation, it’s prudent to verify the server’s operational status. This can be achieved by attempting to connect to the local machine via SSH.
Execute the following command:
ssh localhost
The initial connection attempt will likely prompt a security warning regarding host key verification. This is expected, as the client does not yet possess the server’s key.
The system will display a message similar to:
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 98:8a:b8:b2:9e:8a:84:e0:d4:08:27:fb:74:f0:de:d4.
Are you sure you want to continue connecting (yes/no)?
Confirming with 'yes' will proceed with the connection, while pressing Ctrl-C will terminate the attempt.
Successful execution of this test confirms that the OpenSSH server is functioning correctly.