openssh-client vs openssh-server on Ubuntu

Secure Shell (SSH) is the standard protocol for securing remote connections and administrative tasks on Linux systems. In Ubuntu, SSH capabilities are divided into two distinct software packages: openssh-client and openssh-server. This article explains the fundamental differences between these two packages, their key components, and how to determine which one you need to install on your system.

The Core Difference

The primary difference lies in the direction of the connection.


What is openssh-client?

The openssh-client package contains the tools required to connect to other systems. If you want to log into a remote server, transfer files securely to another machine, or run commands on a remote VPS, you only need the client package.

Key Tools Included:

Installation Status on Ubuntu:

The openssh-client package is installed by default on almost all Ubuntu installations, including Ubuntu Desktop and Ubuntu Server.


What is openssh-server?

The openssh-server package allows your Ubuntu machine to act as an SSH host. Once installed and configured, it listens for incoming connection requests. If you want to access your Ubuntu machine from another computer, you must install this package.

Key Components Included:

Installation Status on Ubuntu:


Comparison Summary

Feature openssh-client openssh-server
Primary Purpose Connect to remote systems Allow remote systems to connect to you
Background Service None (runs on demand) Runs continuously in the background (sshd)
Default Port Not applicable Port 22 (configurable)
Ubuntu Desktop Default Pre-installed Not installed
Typical Use Case Developers, system administrators, daily desktop users Web servers, cloud instances, remote home servers

How to Install and Manage the Packages

You can manage both packages using Ubuntu’s default package manager, apt.

Installing openssh-client

If for some reason the client is missing from your system, install it with:

sudo apt update
sudo apt install openssh-client

Installing openssh-server

To allow other machines to connect to your Ubuntu system, install the server package:

sudo apt update
sudo apt install openssh-server

Managing the SSH Server Service

Unlike the client, the server runs as a system service. You can control its status using the following commands: