Skip to content

All topics  /  Linux

Enable SSH for Ubuntu 22.04 Code Example

Linux

Jul 14, 2022

Hi Guys

Now, let's see tutorial of Enable SSH for Ubuntu 22.04 Code Example. Here you will learn Install and Enable SSH on Ubuntu 22.04 | Snap Store. I explained simply about Chrome Browser Enable SSH Won't Work at Ubuntu 22.04. if you have question about Enable SSH Run at All Following Upgrade from Ubuntu 22.04 then I will give simple example with solution.

You can use this post for ubuntu 14.04, ubuntu 16.04, ubuntu 18.4, ubuntu 20.04, ubuntu 21 and ubuntu 22.04 versions.

(1). Update Dependencies

(2). Install Openssh

(3). Check Status of SSH

(4). Allow Connection

(5). Connect to SSH Server

Step 1: Update Dependencies


Execute the following command on the command prompt to update dependencies:

sudo apt update 

Step 2: Install Openssh

Following the commands to install the OpenSSH server on system:

sudo apt install openssh-server 

Step 3: Check Status of SSH

Once the packages installation has been finished, execute the following command on command prompt to check SSH service status:

sudo systemctl status ssh 

Step 4: Allow Connection

Execute the following command on command prompt to allow SSH for remote users; is as follows:

sudo ufw allow ssh
sudo ufw enable && sudo ufw reload

Step 5: Connect to SSH Server

Execute the following command with username and ip addres to connect ssh server:

ssh user_name@remote_host