# SSH Server (sshd)

> The program on a server that waits for SSH logins. It checks each one.

**Field:** Infrastructure  
**Category:** SSH & Remote Access  
**Also known as:** sshd, SSH Daemon, OpenSSH Server

## Think of it like

Think of it like the doorman of a building. He waits by the door and checks who you are.

## Definition

The SSH server is the program on a server that answers SSH logins. On Linux it is a daemon called sshd. It waits on port 22 for someone to connect. It checks your key or password, then starts a shell for you. Its rules live in a file called sshd_config.

## Example

Jack installs Ubuntu Server and ticks the box for the OpenSSH server. From then on, sshd waits for his login.

## Example code

```console
$ systemctl is-active ssh
active
```

On Ubuntu the service is called ssh. Active means it is waiting for logins.

## Why it matters

If sshd stops, nobody can log in from afar. If it is set up badly, the wrong people can.

## Common mistake

Restarting sshd after a bad edit and closing your only session. Keep one session open and test from a second one.

## Three principles

- **A daemon.** Runs all the time in the background.
- **Checks you.** Key or password, then a shell.
- **One config file.** Its rules live in sshd_config.

## Related terms

- [Secure Shell (SSH)](https://learn.benibix.com/term/infrastructure/ssh)
- [sshd_config](https://learn.benibix.com/term/infrastructure/sshd-config)
- [SSH Host Key](https://learn.benibix.com/term/infrastructure/host-key)
- [Daemon](https://learn.benibix.com/term/infrastructure/daemon)
- [systemd](https://learn.benibix.com/term/infrastructure/systemd)

## Taught in

- [SSH Client and Server](https://learn.benibix.com/learn/infrastructure-ssh/ssh-client-and-server): SSH, 1/9

![A laptop on the left runs the ssh command. A locked tunnel runs across the internet to port 22 on a server on the right, where the sshd program answers. Typed commands travel right through the tunnel and the server's replies travel back left. Beside the laptop, a small file marked ~/.ssh/config holds a saved nickname for the server.](https://learn.benibix.com/diagrams/inf3-ssh.svg)

---

Source: https://learn.benibix.com/term/infrastructure/ssh-server
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
