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-serverStep 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 sshThis 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 sshStep 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 sshLook for two key indicators in the terminal output:
- Loaded: This line should display
loaded (...; enabled; ...)which confirms the service is enabled for boot. - Active: This line should display
active (running)to indicate the service is currently operational.