Centralized SSH Key Management
You set up centralized ssh key management by signing user public keys with a central authority key. Your Linux servers then trust that single authority instead of static key files on every host. Many teams start by copying raw public keys to server files through scripts or tools. When roles stay too broad, old keys remain on hosts and give former staff full root login. How centralized ssh key management works with OpenSSH OpenSSH added certificate login for users and hosts in version 5.4. It
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up centralized ssh key management by signing user public keys with a central authority key. Your Linux servers then trust that single authority instead of static key files on every host. Many teams start by copying raw public keys to server files through scripts or tools. When roles stay too broad, old keys remain on hosts and give former staff full root login.
How centralized ssh key management works with OpenSSH
OpenSSH added certificate login for users and hosts in version 5.4. It uses a simple format that differs from standard web certificates. A central authority key signs a user public key to make a certificate. That signed certificate holds the user public key and an identity string. It also holds one or more principal names and a set of login options.
To set this up, your team creates a central authority key pair on a safe server. You place only the public part of that authority key onto your target Linux hosts. When an engineer needs to log in, they send their personal public key to the authority. The key tool signs the public key with the authority key. This signing step sets the key identity and lists the allowed user or host principals. You can also sign a host key to stop false server warnings for your team.
During the signing step, you should always set a short valid time window. By default, signed OpenSSH certificates stay valid forever if you do not set an end time. Short time windows help because you do not need to clean up old keys on hosts. When the time window ends, the target server rejects the certificate right away.
Why static key files fail at scale
Without a central authority, teams must push public keys to every server they run. When someone leaves the team, you must find and delete their key from every host. If one server is offline during that cleanup, the old key stays active there. Teams also share single login accounts like ubuntu or root across many engineers. When five people share one key file, the server log only shows the shared account name. You cannot tell which person logged in or ran a bad command.
A bastion or jump host can put network traffic in one place, but keys still pile up. Admins still have to update key lists on the jump host and on target machines. Moving to signed certificates fixes the key distribution problem by putting trust in one place. Each certificate holds a unique identity string, so login logs show who owns the key.
SSH Key Rotation + Centralized Log Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native certificate setups solve and what they miss
Using an OpenSSH authority solves key sprawl across your servers. You no longer push key files to hundreds of hosts when a new engineer joins. It also gives you clear login logs because the server records the certificate identity string. Short validity windows reduce the risk of stolen keys sitting on laptops for months.
Still, this native setup only checks who can log in at the start of a session. Once the server accepts the certificate, the user gets a standard Linux shell for that principal. The certificate does not watch or control individual commands while the session runs. If an engineer logs in as a shared admin user, they can run any command allowed for that role. They can read private files, dump data containing emails or phone numbers, or stop running apps. Native key signing cannot ask for live peer approval when someone runs a risky command. It also cannot rewrite sensitive fields like card numbers or national IDs in command output.
Add command and file guardrails to SSH access
Host firewalls and certificate principals control who opens an SSH session. Yet an allowed user or agent can still run a bad one-shot command or pull sensitive files over sftp. In practice, hoop.dev sits inline on the host as an open-source SSH server with guardrails that uses OpenSSH certificates. For every one-shot command or sftp task an agent or human runs in production, hoop.dev decides to pass, mask, block, or escalate it for review.
Using hoop.dev SSH controls, guardrails check one-shot commands, env variable names, and sftp or scp paths before they run. Port forwards default to deny unless the target is listed. Because interactive shells have no statement boundary and carry no guardrails, teams can turn them off so every command is checked and logged. Check out the MIT-licensed project on GitHub.
Frequently asked questions
How do OpenSSH certificates differ from standard public keys?
A standard public key has no owner name or end date built into it. An OpenSSH certificate wraps the public key with an identity, allowed principals, and a signature from your authority key.
What happens if you do not set an expiration time on a signed SSH key?
OpenSSH certificates remain valid forever unless you define a validity window during the signing step. Always set a short time limit so access expires on its own without manual cleanup.
Does centralized ssh key management control what commands a user runs after login?
No, key and certificate checks only verify who can start the session on the host. Once the shell opens, standard Linux user rules decide every command the person can run.
Related guides
In this post