How to Configure RHEL SSH Certificate

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a rhel ssh certificate by signing user keys with an OpenSSH authority. Then you tell each Red Hat host to trust that signing key for logins. Many teams start by copying static public keys to every server on the network. That habit leaves old keys on hosts long after people change roles. When teams move to signed keys, they often grant broad root principals by mistake. Broad principals let one signed key log in as any admin user on the box. How a rhel ssh certificate works in OpenSSH

SSH Certificates + Certificate-Based Authentication: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up a rhel ssh certificate by signing user keys with an OpenSSH authority. Then you tell each Red Hat host to trust that signing key for logins. Many teams start by copying static public keys to every server on the network. That habit leaves old keys on hosts long after people change roles. When teams move to signed keys, they often grant broad root principals by mistake. Broad principals let one signed key log in as any admin user on the box.

How a rhel ssh certificate works in OpenSSH

OpenSSH added signed key support for users and hosts in version 5.4. It uses a simple format that differs from standard web certificates. A signed file holds a public key, an identity label, and principal names. It also holds options and a signature from a Certification Authority key. You generate a key pair to act as the authority for your fleet. You keep the private signing key safe on a locked down machine. You copy the public authority key to each Red Hat server you run.

When an engineer needs to log in, they send their public key for signing. The authority signs that key and attaches a key identity string for the logs. The authority also lists one or more principals, which are user or host names. By default, the signing tool creates a user credential rather than a host credential. You also set a time window so the signed file expires after a shift. If you skip the time window, the signed key stays valid forever.

How host verification and principal mapping work

On the Red Hat server, the SSH daemon reads the public authority key file. When a user tries to log in, they present their signed credential. The server checks the signature against the trusted authority public key on disk. It also checks that the current time falls inside the valid window. Next, the server checks the principal list inside the signed credential. If the principal matches the target Linux account, the server allows the login.

You can also map principals to local accounts with a separate list on disk. This setup removes the need to push user public keys to every server. You only manage one authority public key file across your Red Hat fleet. You can also sign host keys so users trust the servers they reach. When a client sees a signed host key, it skips the manual fingerprint prompt.

SSH Certificates + Certificate-Based Authentication: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What signed keys solve and what they leave open

Signed credentials solve the pain of static public keys scattered across hundreds of servers. When you set a short valid window, access ends when the timer runs out. You do not have to scrub old files from user folders on every host. The identity string inside the signed key also writes a clear name to system logs. System admins can see which signed key opened a shell on a given host.

Still, a rhel ssh certificate only checks who can start a session on a host. Once the shell opens, the SSH daemon steps out of the way. The signed key cannot see or filter the commands the user runs next. If a user logs in as a shared admin account, host logs get blurry. Multiple engineers might run commands at the same time under that same Linux user. The certificate also cannot mask sensitive data like emails or card numbers in terminal output. If someone dumps a customer file to the screen, raw phone numbers show up. Revoking a signed key before it expires also takes extra work on every host. You must push a revocation list to every Red Hat server to block it early.

Inspect one-shot SSH commands and file tasks

SSH certificates and host rules decide who is allowed on a machine. Setup alone does not check single commands or block sftp reads on sensitive paths. By design, hoop.dev runs an inline open-source SSH listener on the host where engineers and AI agents keep their normal ssh, sftp, and scp tools. On every production command or file operation, hoop.dev decides whether to pass, mask, block, or hold it for approval.

First, hoop.dev guardrails check one-shot commands and file paths before they run, and hoop.dev data masking masks matched values in file downloads. The audit trail logs the certificate principal, requested action, and verdict without storing session content. Interactive shells carry no guardrails and can be turned off when every action must be checked. Explore the code on GitHub.

Frequently asked questions

How is an OpenSSH certificate different from an X.509 certificate?

OpenSSH uses its own simple format instead of the complex X.509 standard. It packs a public key, identity text, principals, and options into a small file. Standard SSH tools sign and check it without external web libraries.

What happens if you do not set an expiration window when signing?

If you leave out the validity window, the signed credential never expires on its own. That creates the same risk as a static key that lives on a server forever. Always set a short time limit when signing a user key.

Can one signed key work for both user logins and host identity?

No, the signing tool makes a user credential by default when it signs a key. You must tell the tool to make a host credential during the signing step. Servers and clients check the type field before they accept the login.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.