SSH Projects

Published
Length
3 min read

Luis Felipe Dias

All posts

To build secure ssh projects, sign user public keys with a central certificate authority. Then map those signed certificates to strict server roles and short validity windows. Many engineering teams start ssh projects by copying static public keys onto every server. That approach leaves old keys behind when people change roles or leave the team. Broad Unix accounts also let anyone with a key run any command at any time. How to structure ssh projects with OpenSSH certificates A clean setup sta

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.

To build secure ssh projects, sign user public keys with a central certificate authority. Then map those signed certificates to strict server roles and short validity windows. Many engineering teams start ssh projects by copying static public keys onto every server. That approach leaves old keys behind when people change roles or leave the team. Broad Unix accounts also let anyone with a key run any command at any time.

How to structure ssh projects with OpenSSH certificates

A clean setup starts by replacing raw public keys with OpenSSH certificates. The key generation tool signs a public key using a Certificate Authority key. Each signed certificate holds the public key, an identity string, principal names, and options. OpenSSH certificates use a much simpler format than TLS certificates. You can create user certificates for people and host certificates for servers.

During signing, the operator sets a key identity to track who owns the certificate. The operator also lists one or more principal names on the certificate. These principals match the user or host accounts allowed for login. If you skip the validity window setting, the certificate stays valid forever. Good projects always set a short start and end time during the signing step.

Many teams also place a bastion or jump host at the network edge. Engineers log in through the bastion before reaching internal Linux machines. Servers inside the network trust the single Certificate Authority public key. When an engineer presents a valid certificate, the server checks the signature and principal list. This layout stops teams from copying authorized key files across hundreds of machines.

Why native SSH setup leaves a runtime command gap

Native OpenSSH certificates solve the problem of static keys sitting on servers forever. They verify who can log in to a host and which Unix account they enter. A bastion host also keeps internal server ports off the public internet. For basic network hygiene, these two steps form a strong baseline.

SSH Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, the native setup only checks identity at the moment the session starts. Once a user enters a shell, OpenSSH does not inspect individual commands in flight. An engineer who logs in as a shared admin user can read any local file. They can also run destructive shell commands or dump sensitive data to their screen. Standard server logs record the login event, not the full output of every command.

In real ssh projects, teams need control over what happens inside the active session. Sometimes a developer only needs to run one safe diagnostic command on a host. Other times, a risky shell action requires a quick peer review before it runs. Relying on Unix groups alone forces an all-or-nothing choice at login time. Closing this gap requires inspecting commands and filtering sensitive output such as emails or card numbers.

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 open-source SSH listener on the host where people and agents keep their normal ssh, sftp, and scp tools.

First, hoop.dev guardrails check one-shot commands and file paths before they run. Next, 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

What is the difference between an OpenSSH user certificate and a host certificate?

A user certificate lets a person log in to a server account. A host certificate proves a server's identity to the client and stops trust warnings.

Why do static SSH keys cause problems in growing ssh projects?

Static keys never expire on their own and must be removed from every server by hand. Certificates fix this because they can expire after a short validity window.

Do OpenSSH principals restrict which shell commands a user can run?

Principals only decide which Unix account a certificate holder can enter at login. Unless you set a single fixed command option, the user gets full account permissions.

The query runs. The emails stay hidden.