Enable ssh on ubuntu 22.04; Through this tutorial, we will learn how to enable ssh and use ssh on ubuntu 22.04 using command line or terminal.
SSH is a communication protocol to communicate between two different machines, one is the client and the other is the host. In this write-up, we have installed the OpenSSH server in Ubuntu 22.04 and used it to connect to a remote machine.
Enable SSH Ubuntu 22.04 Command Line
Follow the below given steps to enable and use ssh in ubuntu 22.04 using terminal or command line:
- Step 1 – Update Dependencies
- Step 2 – Install Openssh
- Step 3 – Check Status of SSH
- Step 4 – Allow Connection
- Step 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
Execute the following 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:
Through this tutorial, we have learned how to install, connect and enable ssh on ubuntu 22.04 system.