Enable SSH on Ubuntu 20.04 - Step by step guide ?


To understand the SSH (Secure Shell) better, a user should know that it is actually a network communication protocol which basically allows two or more devices (computers) to connect and exchange information (c.f. http, and that is the protocol for transferring data also including internet sites) with each other. The very fact that the interaction connecting the two or more computers is encoded is an intrinsic characteristic of SSH which is confidential to any unrelated party, in return makes it more ideal for usage over unsecured channels.

You may access to the system of SSH through a software on the device of the client of SSH and transmit files to / from the SSH archives using a command line. Operating system like Linux have this system already built in and a user only has to enable the system by performing a few steps.

Here at Ibmi Media, we shall look into how to enable SSH on Ubuntu 20.04.


What is the Significance of SSH ?

The SSH server makes sure to provide a secured and safe system for the largest number of operating systems including Linux. SSH is dependable and secured for professionals in this field, and for this cause it is widely utilized and trusted in the High Performance Computing sector, for the exchange and storage of confidential information or codes etc. by the professional of this field.


Steps to enable and set up SSH

On Ubuntu, enabling SSH is a simple process. After installing, enabling and connecting OpenSSH in your Ubuntu system will make you capable of transferring data safely with the use of secure copy (SCP) and SSH file transfer protocol (SFTP).

To install and activate SSH on your Ubuntu system, execute the following stated required steps:


1. Perform System Update

Start by opening the terminal and running the below system update command:

$ sudo apt update


2. Install the OpenSSH server

In the terminal, enter the following command to install the OpenSSH server package through apt-get in your Ubuntu system:

$ sudo apt install openssh-server


3. Check the status of SSH

By default, the SSH server will already be functioning upon installation, in your system,.

But if that is not the case, you can Type the following command in order to verify the status of the SSH server:

$ sudo systemctl status ssh

After entering the command to check the status of the SSH server in your system, which would be running by now, you will be able to see an output that would verify the running of the SSH server.


4. Enable SSH through Firewall 

Ubuntu has an internal firewall known as 'ufw', which basically is the abbreviation for "uncomplicated firewall". That suggests that the Ubuntu operating system comes with a firewall tool that prevents it from being hacked and provides protection in case of any foreign bugs. If that is the case with your system, then SSH server would not be enabled on its own, you will have to enable it.

Open the SSH port in your system for the firewall to accept a new server with the below command:

$ sudo ufw allow ssh

This would enable the SSH server in you system by commanding the firewall to allow SSH to function properly.


[Need to fix Linux SSH issues ? We can help you. ]


Conclusion

This article covers how to enable ssh on Ubuntu 20.04 LTS Linux system. In fact, the idea behind using SSH is to establish a secure connection with another computer in the network. However, the remote computer must have a running SSH server, otherwise, we won't be able to connect it using command or SSH client from our local computer.


How to Generate Public and Private Keys for SSH ?

  • Open command line- Terminal or Prompt on your local system.
  • Enter SSH key generator command that will generate the  key ssh-keygen.
  • Hit the Enter key.
  • (optional) Then you can enter a password in order to add an additional barrier when establishing the connection. Otherwise, simply press the Enter key two times, if you don't want the system to ask for an additional password query.
  • Ultimately, two files are created in the hidden directory ".ssh" under your user directory: "id_rsa" and "id_rsa.pub". The "rsa" in the file name stands for the cryptography used, but you don't have to worry about it. The file extension "pub" stands for "Public", so it is the public key. Whereas the file without any extension is your private key.

For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com