Central SSH Key Management

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up central ssh key management by signing user keys with a central authority. Instead of copying public keys to every host, servers trust one signing key. Most teams start by pushing static public keys to servers with scripts. That approach breaks down fast as hosts and engineers grow. Static keys sit on disks forever if nobody deletes them. Overly broad roles also let one stolen key open every server. How central ssh key management works with OpenSSH OpenSSH added support for user and

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 central ssh key management by signing user keys with a central authority. Instead of copying public keys to every host, servers trust one signing key. Most teams start by pushing static public keys to servers with scripts. That approach breaks down fast as hosts and engineers grow. Static keys sit on disks forever if nobody deletes them. Overly broad roles also let one stolen key open every server.

How central ssh key management works with OpenSSH

OpenSSH added support for user and host certificates in version 5.4. These certificates use a much simpler format than standard TLS certificates. An admin creates a Certificate Authority key pair to act as the root of trust. Every target server stores the public half of this signing key. When an engineer needs to log in, the central authority signs their public key.

The signed certificate holds the user public key and an identity string. It also lists one or more principal names, such as usernames or hostnames. The signing tool can attach options and a strict time limit to the certificate. By default, a signed certificate never expires unless you set a validity window. Wise teams set a short window so the certificate dies after a few hours.

When the user connects to a server, the host checks the certificate signature. If the signature matches the trusted authority key, the host reads the principals list. When the principal matches the target account, the server lets the user log in. You no longer need to update authorized key files on every single machine. Adding a new engineer takes one signature instead of hundreds of file edits.

Why teams pair certificates with a bastion

Many teams also route all server traffic through a central bastion or jump host. Putting servers on a private network hides them from public internet scans. Engineers first log in to the jump host using their signed certificate. From there, they hop to the target machine inside the private network.

This layout reduces the number of public entry points you must watch. Yet you still have to manage Linux accounts on the back-end servers. If ten engineers share a root principal, the server logs all show root. You know who entered the network, but host logs blur who ran what.

SSH Key Rotation: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What central ssh key management solves and what it misses

A certificate authority solves the problem of scattered static keys across your fleet. You stop pushing files to hosts when someone joins or leaves the team. Short validity windows also reduce the risk of lost laptops and old keys. The setup decides who can open a shell on a given host.

Still, certificates only check identity at the start of a connection. Once the shell opens, the server trusts every command that user types. Native key checks cannot inspect individual commands or stop a bad script in flight. They also cannot mask sensitive fields like emails or phone numbers in terminal output. If a user queries customer data from a shell, card numbers print in plain text. To control live commands and protect data, you need controls inside the session path.

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 are OpenSSH certificates different from TLS certificates?

OpenSSH uses its own simple certificate format rather than the complex X.509 format. It binds a public key, an identity, principals, and options under one signature.

Do OpenSSH certificates expire on their own by default?

No, OpenSSH certificates remain valid forever unless you set a time window when signing. Teams should always set a short lifespan when they issue a user certificate.

Does a certificate authority remove the need for command auditing?

No, a certificate authority only verifies who is allowed to log in to a host. It does not log shell commands or rewrite national IDs in command output.

The query runs. The emails stay hidden.