How to Install SSH on Ubuntu 22.04


To access a computer securely over a network, system administrators require a protected connection to prevent malicious cyber-attacks. Therefore, encryption protocols like SSH (acronym for secure shell) are essential for keeping everything secure. It provides a secure means of communication between a client and server and ensures that all the communication is encrypted for security.

This post will illustrate the complete process of installing SSH on Ubuntu 22.04.

How to Install SSH on Ubuntu 22.04?

To install SSH on Ubuntu 22.04, we can use the default openssh-server package. Here are the stepwise instructions that will help you install SSH on Ubuntu 22.04 without any obstacles:

Step 1: Update System Packages

Before installing new software or packages, updating the system packages helps us get the optimal performance:

sudo apt update

Step 2: Install SSH

In the terminal window, type the following sudo command and hit the enter button to install SSH on Ubuntu 22.04:

sudo apt install openssh-server openssh-client -y

Step 3: Verify the SSH Service Status

See if the SSH service is working/activated by using the below-given command:

sudo systemctl status ssh

If the SSH service status is active in the output, you are ready to proceed forward:

Step 4: Configure the Firewall

Configure the Ubuntu firewall using the built-in UFW tool. For this purpose, use the below-provided command:

sudo ufw allow ssh

Step 5: Check UFW Status

To verify whether the firewall is enabled or not, use the below-provided command that retrieves the status of UFW:

sudo ufw status

The output shows that UFW is enabled/active:

If the output retrieves “inactive”, then use the following command to enable/activate it:

sudo ufw enable

Upon doing so, you will get the following output:

That’s all about installing and enabling SSH on Ubuntu 22.04.

Conclusion

To install SSH on Ubuntu 22.04, first update the system packages and then install the SSH by executing the “sudo apt install openssh-server openssh-client -y” command. After that, use the “sudo systemctl status ssh” command to verify if SSH is activated or not. This post has illustrated a step-by-step guide on installing and enabling SSH server on Ubuntu 22.04.

Print Friendly, PDF & Email
Categories
Tags