# Secure Shell (SSH)

> A locked line to a far computer. You log in and type commands on it.

**Field:** Infrastructure  
**Category:** SSH & Remote Access  
**Also known as:** SSH, ssh Command, SSH Login, OpenSSH

## Think of it like

Think of it like a secret phone line to a far house. You talk, the house does it, and nobody can listen in.

## Definition

SSH is a way to log in to another computer over a network and type commands on it. Everything you send is locked, so nobody in between can read it. You type ssh, then a user name and the server's address. The server usually listens on port 22. It is how almost every Linux server is run.

## Example

Emma rents a server in Frankfurt. From her laptop in London she types ssh emma@203.0.113.10 and gets a prompt on the server.

## Example code

```console
$ ssh emma@203.0.113.10
emma@web1:~$ hostname
web1
```

One line to log in. The next command runs on the server, not on the laptop.

## Why it matters

A headless server has no screen. SSH is the door you use to reach it.

## Common mistake

Typing a command and forgetting which machine you are on. Read the prompt before you run anything risky.

## Three principles

- **Locked line.** Nobody in between can read it.
- **Port 22.** Where the server usually listens.
- **Keys beat passwords.** Log in with a key pair.

## Related terms

- [SSH Server (sshd)](https://learn.benibix.com/term/infrastructure/ssh-server)
- [SSH Key Pair](https://learn.benibix.com/term/infrastructure/ssh-key-pair)
- [Headless Server](https://learn.benibix.com/term/infrastructure/headless-server)
- [Command Line](https://learn.benibix.com/term/infrastructure/command-line)
- [Network Port](https://learn.benibix.com/term/infrastructure/port)

## 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
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.
