Enable SSH on Ubuntu

Logesh
2 min readMay 8, 2022

--

ssh

SSH (Secure Shell) is a network protocol used to connect the server securely over the network. The communication between the client and the server is encrypted.

In this article we are going to learn how to enable the SSH on an Ubuntu machine.

I have an Ubuntu (20.04) machine installed using virtualization (VMware Workstation).

The Ubuntu machine has the Internet Connection.

Now before installing any package lets update the apt with the root privilege.

you can find the diff between the update and upgrade here.

sudo apt update
sudo apt upgrade

Now we are going to install the openssh server for SSH service.

sudo apt install openssh-server

Here we go! SSH server have been installed on the machine. Once the installation is completed, the SSH service will start automatically.

To see the SSH service status:

sudo systemctl status ssh

To start and to stop the service

sudo systemctl start sshsudo systemctl stop ssh

Now I can connect to my ubuntu machine from my Windows host using SSH.

  1. Get the IP of the Linux machine.
ifconfig

2. Check whether the IP (Ubuntu) is reachable.

ping success

3. SSH connection

connecting to Linux from Windows via SSH
whoami

Now that we have connected successfully to the Ubuntu machine using SSH.

Hope you liked this article.

Happie Learning :)

Keep Learning!!!

--

--