Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 7 · Security · the encrypted remote shell

SSH

Secure Shell

SSH is the way in. It gives an administrator an encrypted, authenticated channel to a remote machine — a shell, a file transfer, a tunnel — over a network that can’t be trusted. It replaced Telnet and rlogin, which sent passwords in the clear, and is now the backbone of server operations.

SSH proves both ends’ identity, then opens an encrypted channel that can carry a shell, files, or any tunnelled port.

Operates at
Layer 7
over a TCP connection
Port
22
TCP
Authenticates
Both ends
host key + user key
Version
SSH-2
1996 · SSH-1 broken

How it works

Three layers, built one on the last
ClientServer
1 · Transport layer — key exchange & host key
Diffie-Hellman derives a shared session key — the channel is encrypted from here on.
Server presents its host key; the client checks it against known_hosts — is this really the server?
2 · User authentication — prove who you are
Public key: client signs a challenge with its private key; server checks authorized_keys.
Or password, or keyboard-interactive (MFA) — all inside the already-encrypted channel.
3 · Connection layer — multiplexed channels
One connection carries many channels at once — an interactive shell, an SFTP transfer, and forwarded ports, all multiplexed.

Encrypt first, verify the server, then authenticate the user — only then does any shell or file traffic flow, and it can all share one connection.

The main points

What SSH does, step by step

1
Agree a session key

Over TCP 22, a Diffie-Hellman exchange gives both sides a shared secret without ever sending it.

2
Verify the host key

The client matches the server’s key to known_hosts — that first-connect fingerprint prompt is this check.

3
Authenticate the user

A key pair is the norm — the private key stays on the client, its public half sits in authorized_keys.

4
Open channels

Run a shell, tunnel a port, or hand off to SFTP — many channels multiplex over the one connection.

What people do with it
Remote shell — a terminal on the server
SFTP / SCP — encrypted file transfer
Port forwarding — tunnel any TCP service
Git transport — push over git@
Jump hosts — hop through a bastion
SOCKS proxy — a dynamic tunnel

In cybersecurity

SSH is the front door to servers, so it is relentlessly probed — and its power to tunnel makes it a favourite for moving quietly once inside.

Keys over passwords

Disabling password auth stops the endless brute-force attempts against port 22 outright.

Host-key checking

Blindly accepting a changed key opens the door to a man-in-the-middle — verify the fingerprint.

Key sprawl

Forgotten authorized_keys entries become standing back doors; rotate and audit them.

Agent forwarding risk

A compromised jump host can hijack a forwarded agent to reach everything you can — scope it.

Tunnelling & exfil

The same port forwarding admins love lets an intruder smuggle traffic straight past a firewall.

Bastion & certificates

Short-lived SSH certificates and a single bastion beat scattering static keys across a fleet.

Rides in the stack

IPTCPSSH

SSH provides its own encryption — it rides straight on TCP rather than through TLS.

Works with

TLSSFTP

See it on Linux

rsyncsssshscpssh-keygen

Layers & auth

The layers
Transportencrypt
Authidentity
Connectionchannels
Auth methods
Public keypreferred
Certificateat scale
KeyboardMFA
Passwordweakest