One person logging into a VPS with an SSH key is simple. Five people, three servers, and someone leaving the team is a different problem. That is the point where the usual setup starts to crack, and it is where the debate over ssh certificates vs ssh keys actually matters. Both methods get you into a server without a password. They differ in who controls access, how revocation works, and how much admin work each new hire creates.
SSH Certificates vs SSH Keys: How the Two Methods Actually Differ
With SSH keys, each person generates a key pair, keeps the private half on their laptop, and hands you the public half. You paste it into ~/.ssh/authorized_keys on every server they need. Nothing else is involved.
With ssh certificate authentication, the server does not trust individual keys at all. It trusts a certificate authority, a single signing key your team controls. When someone needs access, the authority signs their public key and stamps it with an identity, a validity window, and optional restrictions such as which usernames they may use. The server checks the signature against the authority’s public key and lets them in if the certificate is still valid.
The practical difference is where trust lives. Keys spread trust across every authorized_keys file on every server. Certificates centralize it in one authority, and each login carries its own expiry date.
How SSH Keys Work in Practice
SSH keys are the default most VPS owners learn first. You run ssh-keygen, copy the public key with ssh-copy-id, and disable password login. After that, no password crosses the network.
For a solo admin or a pair of developers, this setup is hard to beat: no extra service to run, nothing to renew, nothing to monitor. The same guide to setting up SSH key authentication for multiple team members covers the per-user accounts and file permissions that make it work.
Keys also fail in a predictable way. A private key on a stolen laptop stays valid until someone removes the matching public key from every server. That removal is manual, server by server, and it is easy to forget one.
How SSH Certificates Work
Certificates add one moving part: the certificate authority. You generate a CA key pair once and keep the private half somewhere safe, ideally offline. Each server gets one line in sshd_config trusting the CA public key.
When a team member needs access, they send you their public key. You sign it with ssh-keygen -s, adding their username, a validity period of a day or a week, and the accounts they may use. They use the signed certificate like a normal key, and the server accepts it without their public key ever appearing in authorized_keys.
Expiry does the heavy lifting. A certificate that lasts 24 hours stops working on its own, so a departing contractor loses access the next morning even if nobody remembered to revoke anything. Short-lived certificates are the main reason teams switch, not cryptography.
Where Keys Start to Hurt a Team
Key-based access breaks down gradually, which is why teams often notice it late. The symptoms are familiar:
- Stale keys pile up. Every former contractor and old laptop leaves a public key behind on servers nobody audits.
- Onboarding is manual. Adding one person means editing
authorized_keyson every server, and the editor needs root on all of them. - Offboarding depends on memory. Revocation competes with everything else on someone’s last day. Miss one server and the access survives.
- Shared accounts hide who did what. When five people share one login, the logs show the account, not the person.
- Key hygiene is invisible. Nobody knows if a team member’s private key has a passphrase or sits copied on three machines.
None of this makes keys unsafe for a small team. It makes ssh key management for teams a recurring chore that grows with every server and every hire.
What Certificates Fix, and What They Cost You
Certificates solve the problems above at the source. Access is issued centrally, expires on its own, and is tied to a named identity. Removing someone means not signing their next certificate.
The cost is a new piece of infrastructure. Someone has to guard the CA private key, because anyone holding it can sign a certificate for any user, including root. If it leaks, the CA has to be rotated on every server.
Certificates also add a step to daily work. Team members have to fetch a fresh certificate when the old one expires, usually a small script or a short command each morning. Most teams settle on a window between one day and one week, balancing convenience against how quickly access should die.
A ssh certificate authority is not a product you buy. It is a key pair plus a signing workflow, and that workflow can be a single script run by an admin or a small internal service. What matters is the discipline: the CA key stays protected, signing is logged, and expiry windows stay short.
Side-by-Side Comparison
| Factor | SSH keys | SSH certificates |
|---|---|---|
| Setup effort | Low, built into OpenSSH | Medium, CA key plus signing workflow |
| Adding a user | Edit authorized_keys on every server | Sign one certificate |
| Removing a user | Delete the key from every server | Stop signing; old cert expires on its own |
| Access expiry | Never, unless removed manually | Built in, from hours to weeks |
| Identity in logs | Account name only, unless keys are tracked | Certificate identity recorded at login |
| Single point of failure | Each key is independent | The CA private key |
| Best fit | Solo admins, small stable teams | Growing teams, contractors, many servers |
Certificates Do Not Replace Other Hardening
Switching login methods does not make a server secure on its own. Certificates still need the basics: password login disabled, root login restricted, the SSH port protected, and failed logins watched. The same hardening guide for SSH on Ubuntu 24.04 applies whether the server trusts keys or certificates, and fail2ban still earns its place against brute-force attempts.
Two-factor authentication is also independent of the login method. A certificate proves which key signed in, not that the person holding it is who they claim to be, so a second factor still helps on servers that hold anything sensitive. The steps in our guide to two-factor authentication for SSH work the same with certificates as with plain keys.
Logging matters more once access is centralized. Certificates record an identity at login, but that only helps if someone reads the logs. A regular check of who logged into your VPS and whether anything looks suspicious turns that identity data into something useful, instead of lines nobody ever opens.
Which Login Method Should Your Team Pick?
If one or two people manage a handful of servers and the team rarely changes, stay with keys. The setup is simpler, there is nothing extra to maintain, and the revocation problem is small enough to handle by hand. Just audit authorized_keys on a schedule and remove keys that no longer belong to anyone.
If your team is growing, if contractors come and go, or if you run more servers than you can list from memory, certificates are the safer choice. The deciding factor is offboarding. When someone leaves on a Friday evening and nobody touches a server until Monday, key access is still live. With short-lived certificates, it is already gone.
A middle path works for teams not ready to run a CA. Keep keys, but tighten the process: one account per person, no shared logins, a written list of who has access to which server, and a monthly audit that removes stale keys. That discipline closes most of the gap until the team is big enough to justify certificates.
A Practical Migration Path
Moving from keys to certificates does not need a flag day. Roll it out in stages:
- Generate the CA key pair on a host that is not internet-facing, and back it up somewhere encrypted.
- Add the CA public key to one staging server and test a signed login for one user.
- Set the certificate validity to one week while the team gets used to fetching fresh certificates.
- Roll the CA trust line out to the remaining servers, one at a time, keeping key login working during the transition.
- Once everyone logs in with certificates, remove the old public keys from
authorized_keysand shorten the validity window to a day or two. - Write down the revocation plan: how the CA key gets rotated, who can sign, and where signing is logged.
That last step is the one teams skip, and it is the one that matters when something goes wrong. A CA without a rotation plan is a single point of failure with no exit.
Keys are simple and proven, certificates scale better and clean up after themselves. Pick the method that matches how your team actually changes, not the one that sounds more advanced, and revisit the choice when the team doubles.