Ubuntu Server SSH Configuration Guide
Step 1: Install OpenSSH Server
sudo apt update
sudo apt install openssh-server -y
-
sudo apt update
Updates the package list from Ubuntu repositories to get info on the latest available versions.
-
sudo apt install openssh-server -y
Installs the OpenSSH server package; -y automatically answers “yes” to prompts.
Step 2: Check SSH Service Status
sudo systemctl status ssh
- Shows whether the SSH server service is active (running), inactive, or failed.
Step 3: Start SSH Service (If Not Running)
sudo systemctl start ssh
- Starts the SSH server service immediately.
Step 4: Enable SSH to Start Automatically on Boot
sudo systemctl enable ssh
- Configures the system to start the SSH server automatically every time the server boots up.