How to Enable SSH Service on Boot in Ubuntu

This guide explains how to configure the Secure Shell (SSH) service to launch automatically during the system boot process on Ubuntu Linux. You will learn the specific terminal commands required to install the service, enable its automatic startup, and verify its current operational status.

Step 1: Install the SSH Service

Before configuring SSH to start on boot, ensure the OpenSSH server package is installed on your Ubuntu system. Open your terminal and run the following commands to update your package list and install the service:

sudo apt update
sudo apt install openssh-server

Step 2: Enable SSH to Start on Boot

Ubuntu uses the systemd system and service manager to control system services. To configure the SSH service to start automatically upon system startup, execute the following command:

sudo systemctl enable ssh

This command creates the necessary symbolic links to ensure the service initializes during the boot sequence.

Step 3: Start the SSH Service

If the SSH service is not currently running, you can start it immediately without needing to reboot the system by running:

sudo systemctl start ssh

Step 4: Verify the Service Status

To confirm that the SSH service is active and successfully configured to start on boot, check its status with this command:

sudo systemctl status ssh

Look for two key indicators in the terminal output: