Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is the SSH Protocol?

SSH gives encrypted, authenticated remote access to servers and network devices. The protocol is sound; the key material scattered across most estates is the real problem.

Illustration for the cybersecurity term SSH
Home / Blog / Cybersecurity Terms / What Is the SSH Protocol?
17 November 2026

What Is the SSH Protocol?

What Is the SSH Protocol?

Secure Shell replaced telnet, rlogin, and rsh in the late 1990s for the obvious reason that those protocols sent credentials in plaintext. The current version, SSH-2, is defined across RFCs 4251 to 4254, and it provides an encrypted channel, server authentication, client authentication, and multiplexed sessions over a single connection. It is how most Linux servers, network devices, and build systems are administered, and how a great deal of automation authenticates.

How a Session Is Established

The client connects, both sides exchange version strings and negotiate algorithms, and a key exchange — usually Curve25519 or an elliptic curve Diffie-Hellman variant — produces a shared secret. The server proves its identity by signing with its host key, which the client checks against its known_hosts file. Only then does the client authenticate.

That known_hosts check is trust on first use, and it is routinely defeated by users who type “yes” to the warning without reading it. The structural fix is an SSH certificate authority: the server presents a certificate signed by a CA the client already trusts, and the client verifies the signature rather than remembering a fingerprint. This also removes the problem of rebuilt servers producing alarming warnings that teach people to ignore them.

Authentication Methods

Public key is the standard. The client holds a private key, the server holds the corresponding public key in authorized_keys, and possession is proved without transmitting anything reusable. Use Ed25519 for new keys; it is compact, fast, and has no parameter choices to get wrong. RSA remains acceptable at 3,072 bits or more, and DSA is obsolete and disabled in current OpenSSH builds.

Password authentication should be disabled on anything internet-facing. SSH services on public addresses receive continuous credential attacks, and the arithmetic favours the attacker.

Keyboard-interactive allows multi-factor, typically a TOTP code alongside a key, which is worth requiring for access to production systems.

Certificates issued by an internal CA, with short validity measured in hours, are the strongest option available and the one that scales. They remove the authorized_keys management problem entirely.

Key Sprawl Is the Real Risk

The protocol is rarely the weakness. The estate around it is. A typical organisation has thousands of authorised keys, many of them added years ago by people who have since left, with no record of which private key they correspond to or who holds it. Private keys sit unencrypted on developer laptops, in CI pipeline variables, and committed to repositories.

Three habits make the difference. Inventory authorized_keys files across the estate and remove entries you cannot attribute. Require a passphrase on every private key and use an agent rather than disabling the passphrase for convenience. And prefer certificates with short lifetimes, so that an exposed key expires rather than persisting indefinitely.

Agent forwarding deserves a specific warning. With ForwardAgent enabled, anyone with root on the intermediate host can use your agent to authenticate onward as you. Use ProxyJump instead, which tunnels the connection without exposing the agent.

Vulnerabilities Worth Knowing

OpenSSH has a strong record, which makes its exceptions notable. The XZ Utils backdoor, CVE-2024-3094, discovered on 29 March 2024, was a supply chain compromise of a compression library linked into sshd on some distributions, inserted over two years by a contributor who had built up trust in the project. CVE-2024-6387, published in July 2024 and nicknamed regreSSHion, was an unauthenticated remote code execution flaw caused by a race condition reintroduced into glibc-based builds. The Terrapin attack, CVE-2023-48795, allowed an on-path attacker to downgrade the handshake by manipulating sequence numbers, fixed by the strict key exchange extension.

Hardening Worth Applying

Our Infrastructure Security Testing Services audit SSH configuration and key material across the server estate, which usually surfaces more authorised keys than anyone expected.

FAQ – Frequently Asked Questions

Which SSH Key Type Should I Use?

Ed25519 for new keys. It is compact, fast, resistant to the implementation mistakes that affect other algorithms, and has no parameter choices to get wrong. RSA at 3,072 bits or more remains acceptable where older systems require it. ECDSA is adequate but offers no advantage over Ed25519, and DSA is obsolete and disabled in current OpenSSH.

Is Agent Forwarding Safe?

No, not on hosts you do not fully control. Anyone with root access on the intermediate machine can use your forwarded agent to authenticate onward as you, to every system your key opens. Use ProxyJump instead, which tunnels the connection through the intermediate host without exposing your agent socket to it.

Should SSH Be Exposed to the Internet?

Preferably not. Place a bastion host behind a VPN or ZTNA broker and reach servers through it. If direct exposure is unavoidable, disable password authentication entirely, restrict source addresses where possible, require multi-factor authentication, patch on an emergency schedule, and monitor authentication logs. Changing the port reduces noise but provides no real protection.

How Do I Manage SSH Keys at Scale?

Move to certificates. An internal certificate authority issues short-lived certificates after a user authenticates to your identity provider, so servers trust the CA rather than holding individual authorised keys. This removes key sprawl, gives automatic expiry instead of manual revocation, and produces a usable record of who accessed what and when.

Related Terms

You May Be Interested In These

What Is a One-Time Password?

Cybersecurity Terms

17 November 2026

What Is a One-Time Password?

Read More
What Is Microsoft 365 Security Configuration?

Cybersecurity Terms

17 November 2026

What Is Microsoft 365 Security Configuration?

Read More
What Is a Web Shell?

Cybersecurity Terms

17 November 2026

What Is a Web Shell?

Read More