Enable SSH on Ubuntu 22.04 Jammy Jellyfish Linux

SSH stands for secure shell and is the primary method of remote access and administration on Linux systems. SSH is a client-server service providing secure, encrypted connections over a network connection. After downloading Ubuntu 22.04 Jammy Jellyfish or upgrading to Ubuntu 22.04, it will probably be one of the first things you want to configure.

In this tutorial, we will go over the step by step instructions to install and configure SSH on Ubuntu 22.04 Jammy Jellyfish Server or Desktop Linux. This will help you whether you just want to connect to remote systems via SSH or you want your own system to accept incoming connections as well.

In this tutorial you will learn:

  • How to install SSH daemon
  • How to enable SSH daemon to start after reboot
  • How to start SSH daemon server
  • How to open firewall SSH port 22
  • How to allow root login to SSH server
SSH Server on Ubuntu 22.04 Jammy Jellyfish Linux
SSH Server on Ubuntu 22.04 Jammy Jellyfish Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software OpenSSH
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Enable SSH on Ubuntu 22.04 step by step instructions

Follow the step by step instructions below to get SSH installed on your Ubuntu 22.04 system and use it to initiate remote connections or accept incoming connections.

  1. The first thing we need to do is open a command line terminal and use the following apt commands to install the SSH server and client metapackage.
    $ sudo apt update
    $ sudo apt install ssh
  2. The SSH service can be controlled through systemd. Use the following commands to start the SSH service, and optionally enable the SSH service to start automatically upon each system boot.
    $ sudo systemctl start ssh
    $ sudo systemctl enable ssh
  3. Check whether the SSH server is running by using the systemctl status command.
    $ sudo systemctl status ssh
  4. In order to accept incoming connections, you will need to allow the service through ufw by executing the following command.
    $ sudo ufw allow ssh
  5. That’s all there is to it. As long as there is no physical router or firewall blocking connections to the Ubuntu 22.04 system, it should be ready to accept incoming connections. Another thing you may want to do is configure SSH to allow remote connections from the root account.

Closing Thoughts

In this tutorial, we saw how to enable SSH on Ubuntu 22.04 Jammy Jellyfish Linux. This included installing the OpenSSH client and server metapackage, and configuring our system to accept incoming connections. SSH is an essential protocol for most Linux systems, as it allows you to open remote terminals to any number of systems, or to manage your own system from over the internet.