How to Make SSH More Secure
You learn how to make ssh more secure by replacing static keys with signed certificates. You also disable password logins and set strict time limits on user keys. Many teams start by copying public keys to every server by hand. They often share one root account across the whole engineering team. Over time, old keys stay on servers after people leave the company. Broad shell permissions also let one bad command break a live server. How to make ssh more secure with OpenSSH certificates Static p
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 learn how to make ssh more secure by replacing static keys with signed certificates. You also disable password logins and set strict time limits on user keys. Many teams start by copying public keys to every server by hand. They often share one root account across the whole engineering team. Over time, old keys stay on servers after people leave the company. Broad shell permissions also let one bad command break a live server.
How to make ssh more secure with OpenSSH certificates
Static public keys do not expire on their own. A better native workflow uses an OpenSSH Certification Authority key. You use the key generation tool to sign a user key or host key. This creates a certificate in a simple format built for OpenSSH. It is much simpler than the X.509 format used in web traffic.
Each signed certificate holds a public key and an identity string. It also holds one or more principal names for users or hosts. You can add options and set a clear time window for the key. Without a time window, a signed certificate stays valid forever. Instead, teams sign user certificates that expire after a few hours. Servers only need to trust the single authority key. You do not need to copy user keys to every host anymore.
Setting up host checks and bastion hosts
You can also sign host keys with your authority key. When a user logs in, their client checks the host certificate by default. This stops people from ignoring host key warnings on first login. Teams also place a bastion or jump host in front of private servers. Engineers log in through this single entry point rather than reaching every host directly. You can also turn off root login and password checks in the server settings. This forces everyone to use a valid, signed key to get in.
What native SSH security leaves open
OpenSSH certificates and jump hosts solve the login problem very well. They prove who is logging in and when their key expires. Still, native server settings only check the user at the door. Once a session starts, the user gets a full shell on that machine.
SSH Access Management + VNC Secure Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Standard SSH rules do not inspect individual commands while they run in flight. A user with a valid key can still run a destructive script by mistake. They can also read raw database files or local logs on the disk. Those files might hold customer emails, phone numbers, card numbers, or national IDs. Native tools do not rewrite matched fields in results before they hit the screen. Also, host logs only show who logged in unless you build extra logging tools. You still have a gap between login checks and live command control.
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 provides an open-source SSH server with guardrails on the host that uses OpenSSH certificates.
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 TLS certificates?
OpenSSH uses its own simple certificate format instead of the complex X.509 format. A signed certificate packs a public key, an identity name, principals, and options together. The OpenSSH key tool creates and signs them without extra third-party software.
Why should teams replace static SSH keys with certificates?
Static keys sit in server files forever unless someone removes them by hand. Signed certificates let you set a short time window so access expires on schedule. You also manage one central authority key instead of updating files on every server.
Does a bastion host control what commands an engineer runs?
A standard bastion host only routes network traffic to your private servers. Once the user reaches the target machine, their shell role decides what they can run. It does not block risky commands in flight or mask sensitive fields in output.
Related guides
In this post