Simple guide to install SSH on Ubuntu — LinuxTechLab

SSH is one of the most widely used methods to access Linux & Unix servers. SSH provides an encrypted method to access & communicate between servers over insecure networks. In technical term, it’s a cryptographic protocol that allows for secured, encrypted communication between a host & a client.

In most of the Linux distributions, SSH comes installed & we can access those servers using ssh command but with Ubuntu Desktop (& based distros) that is not the case. We are required to install SSH on Ubuntu to be able access it.

Though we have an ssh client available on Ubuntu, it’s the ssh server that we need to install on Ubuntu. It means we can access other servers from Ubuntu using ssh but other machines will not be able to access our Ubuntu systems.

Recommended Read: How to setup PasswordLess SSH in Linux? Also Read: How to use SSH command with password in single line

In this tutorial, we will learn to install SSH on Ubuntu.

Install SSH on Ubuntu

SSH server is available with default Ubuntu repositories & we are not required to add any other repos to install it. We only need to run the following command to install it,

$ sudo apt update && sudo apt install openssh-server

Once installed, the ssh server will start on it’s own, but it required we can start it using the following command,

$ sudo systemctl start ssh

Check status with,

$ sudo systemctl status ssh

Note: If you have your firewall enabled on your Ubuntu system, then you would also be required to enable the ssh connections through the firewall. Run the following command to do so,

We can now access our Ubuntu system from other servers. Just open a ssh client & run the ssh command to access it,

We also would recommend that you should read the following tutorial on Ultimate guide to securing SSH sessions & on SSH server: Restrict SSH access on Linux to secure your SSH sessions. That’s it. We have used these simple steps to install ssh on Ubuntu. Please feel free to send in any questions or queries using the comment box below.

Originally published at on April 14, 2021.



-- is a beginner friendly website where you can learn Linux Tips & tricks,Scripting, also has lots of tutorials aimed at making Linux easy.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

GitHub for DSX projects

Introduction to REST API development — Part 1

Mirissa beach, Matara, Sri Lanka.


A Developer's Survival Guide

Swash news: updated features, mobile compatibility and the road ahead

Demystifying Docker:

Food for Agile Thought #192

MLP-Mixer: An all-MLP Architecture for Vision

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

LinuxTechLab is a beginner friendly website where you can learn Linux Tips & tricks,Scripting, also has lots of tutorials aimed at making Linux easy.

More from Medium

6 Steps to Change Jenkins Home in Linux

Nmap network reconnaissance using TCP Ping

TryHackMe — Linux Fundamentals Part2

Linux Series Part 1: Boot Process