SSH Tips and Tricks
Good ssh tips and tricks start with replacing static keys with signed OpenSSH certificates. You also need strict time limits and clear principal names on every certificate. Most teams start by copying public keys to remote servers. They often use one shared jump host to reach private machines. Over time, those static keys pile up across dozens of hosts. When engineers leave or change roles, old keys stay active on servers. Broad OS accounts also give users far more shell power than they need.
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.
Good ssh tips and tricks start with replacing static keys with signed OpenSSH certificates. You also need strict time limits and clear principal names on every certificate. Most teams start by copying public keys to remote servers. They often use one shared jump host to reach private machines. Over time, those static keys pile up across dozens of hosts. When engineers leave or change roles, old keys stay active on servers. Broad OS accounts also give users far more shell power than they need.
Core ssh tips and tricks for OpenSSH certificates
OpenSSH added certificate support for users and hosts in version 5.4. Instead of trusting raw keys, servers trust one Central Authority key. The key tool signs a public key to create a certificate. This file holds the public key, an identity string, and principal names. It also holds options signed by the authority key. OpenSSH uses a much simpler format than standard TLS certificates.
When you sign a key, you set an identity and list principals. Principals are the user or host names allowed for that login. By default, the tool makes a user certificate. You can also choose to make a host certificate instead. Host certificates stop fake server warnings when engineers log in. You should also set a short validity window during the signing step. Without a window, a signed certificate stays valid forever. Short lifetimes mean stolen files expire fast without manual cleanup on hosts.
How to tighten jump hosts and client configs
Another helpful habit is simplifying how engineers reach private networks. Teams often place a bastion at the edge of their network. Engineers pass through this jump host to reach internal Linux machines. Instead of logging into the bastion shell, users should forward traffic through it. Storing keys on a shared bastion creates a high risk for the team. If an attacker compromises that machine, they can take every stored key.
Local client settings also save time during daily server work. Engineers can define short host aliases in their local client file. This removes the need to type long hostnames and usernames each time. You can also reuse an existing network path for multiple shell windows. The first login opens the path, and new shells share it. This makes opening new terminal tabs much faster during an incident.
SSH Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native SSH setups solve and what they miss
Native certificates and client settings solve the problem of static key sprawl. They let teams verify who can open a shell on a server. They also make daily logins faster and cleaner for the engineering team. Still, native server settings only check the user at login time. Once the shell opens, the OS account controls everything the user does.
If twenty engineers share one Linux role, server logs show one username. You cannot easily tell which person ran a destructive command. Native certificates also cannot inspect or filter individual commands in flight. A user with root privileges can read private files or drop tables. Standard SSH tools control who gets in, not what commands run inside.
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
How do OpenSSH certificates differ from TLS certificates?
OpenSSH certificates use a much simpler custom format than X.509 TLS certificates. They still bind a public key, identity, and options to an authority signature.
What happens if you do not set a certificate validity time?
If you skip the validity setting during signing, the certificate never expires. Teams should always set a short time window to limit risk.
Why should teams avoid storing private keys on a bastion?
A shared bastion is a high-value target for attackers. Keeping private keys on local machines prevents theft if the bastion is compromised.
Related guides
In this post