Passwordless SSH Gateway

Published
Length
3 min read

Luis Felipe Dias

All posts

You build a passwordless ssh gateway by signing public keys with an OpenSSH authority. Engineers then log into servers through a jump host without typing a password. Most teams start by copying static public keys onto every target host. Over time, those keys pile up and give users broad, lasting root rights. When an engineer leaves the team, removing old keys across hundreds of hosts takes days. How a native passwordless ssh gateway works with OpenSSH OpenSSH added certificate login for users

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 build a passwordless ssh gateway by signing public keys with an OpenSSH authority. Engineers then log into servers through a jump host without typing a password. Most teams start by copying static public keys onto every target host. Over time, those keys pile up and give users broad, lasting root rights. When an engineer leaves the team, removing old keys across hundreds of hosts takes days.

How a native passwordless ssh gateway works with OpenSSH

OpenSSH added certificate login for users and hosts in version 5.4. Instead of trusting individual keys, each target server trusts one central authority key. The key tool signs a user public key to make a small certificate. This format is much simpler than the X.509 certificates used in web traffic.

Each signed file holds a public key, an identity string, and principal names. Principals are the user or host names allowed for that login. The authority also stamps a set of options and a time window inside. By default, a signed certificate stays valid forever unless the admin sets an end time.

Teams pair this authority with a central bastion or jump host. Engineers log into the jump host first to reach internal Linux machines. Target servers check the authority signature instead of looking up local key files. If the principal name matches and the time window is valid, the login succeeds. Admins can also sign host keys so users never see unknown host warnings.

Where native certificates and jump hosts fall short

OpenSSH certificates fix the pain of copying public keys to every server. They also stop engineers from typing passwords or storing long-lived secrets on laptops. Yet a native certificate setup only checks who can open the shell session. Once the login succeeds, the OS hands full control to that local Linux user.

Notice what happens when five engineers share the same admin principal name. Every person lands in the same Linux account on the target machine. Native logs record the certificate identity at login time, not on every command. If someone drops a table or deletes a file, the trail gets blurry. You know who logged in that hour, not who ran the bad command.

Admins try to limit damage by baking rules into the certificate itself. OpenSSH lets the authority lock a key to one forced command at signing time. That works well for automated backup scripts or single-task jobs. It fails for daily repair work where engineers need to run varied commands. Giving a user an open shell means trusting every command they type next.

Passwordless Authentication + SSH Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Also, live shell output often prints private customer data right to the screen. An engineer reading a log file might see emails, phone numbers, or card numbers. Native SSH pipes raw text straight back to the user terminal. It has no way to spot or rewrite sensitive fields in flight.

Managing key lifetimes and revocations at scale

Running your own signing authority also brings daily upkeep work for the team. Because default certificates never expire, admins must enforce short time limits on every signature. If you forget to set a window, a stolen laptop holds permanent server entry. Even a twelve-hour certificate gives an attacker plenty of time to move around.

Revoking a bad certificate before it expires requires pushing revocation lists to every server. If one host misses that file update, the blocked certificate still works there. Teams must build custom scripts to sync these lists across all cloud accounts. Without tight automation, your passwordless setup still leaves wide gaps in daily control.

Check SSH commands and file transfers on the host

OpenSSH keys and certificates decide who can log into a Linux host. They do not check what a one-shot command or file transfer does once the session starts. With hoop.dev, you run an open-source SSH server with guardrails on the host. It checks callers with OpenSSH certificates and works with ssh, sftp, scp, and rsync clients.

When a caller runs a one-shot command or moves a file, hoop.dev guardrails check the command or path before it runs. Then hoop.dev data masking masks matched sensitive patterns in downloads and output. Interactive shells carry no guardrails because keystrokes have no statement boundary. Teams can turn interactive shells off and allow only commands and file tasks. The audit trail logs who connected and what was allowed or refused, without storing keystrokes or file bytes. See the source on GitHub.

Frequently asked questions

How do OpenSSH certificates differ from standard public keys?

Standard public keys sit in a static file on every single target server. An OpenSSH certificate bundles a public key, identity, and login names with an authority signature. Servers only need to trust the authority key to let valid users log in.

Do OpenSSH user certificates expire on their own?

No, OpenSSH certificates remain valid forever unless you set a time window during signing. Teams must make sure their signing tool sets a clear start and end time. Short lifetimes reduce the risk of old keys sitting on user laptops.

Can a bastion host block specific shell commands during a session?

A standard jump host only forwards encrypted network traffic between the user and the server. You can lock a certificate to one fixed command when you sign it. You cannot inspect or block individual commands inside an open interactive shell.

The query runs. The emails stay hidden.