Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
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.

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.
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.
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.
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.
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.
PermitRootLogin no and PasswordAuthentication no.AllowGroups rather than relying on account existence.AllowTcpForwarding and GatewayPorts unless tunnelling is a requirement, since SSH forwarding is a standard route around egress controls.authorized_keys, which is a common persistence technique.Our Infrastructure Security Testing Services audit SSH configuration and key material across the server estate, which usually surfaces more authorised keys than anyone expected.
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.
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.
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.
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.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.