Stop leaving your SSH Certificate Authorities wide open to internal lateral movement
By Saket Jain Published Linux/Unix
Stop leaving your SSH Certificate Authorities wide open to internal lateral movement
Technical Briefing | 12/5/2026
Most teams roll out SSH certificate-based authentication and feel like they have finally won the security game. They generate a CA, sign their keys, and call it a day. But if that CA key is sitting in an unprotected file on a build server, you aren’t really doing Zero Trust. You are just using a glorified key-based auth system that happens to be harder to rotate.
Treat your CA like the crown jewels it actually is
The fundamental problem is that once a server trusts your CA, it doesn’t care who signed the key as long as the signature matches. If your signing machine is compromised, the attacker can mint ephemeral certificates for every single server in your fleet. I’ve seen teams leave their private CA key sitting on a standard CI/CD agent where any job can grab it. You need to move that signing operation to a hardware security module or a dedicated vault that refuses to export the private key.
ssh-keygen -s /path/to/ca_key -I cert_identity -V +5m -n root,ubuntu user_key.pub
- Force short TTLs on your certificates so a stolen key expires before anyone notices
- Restrict principal access so engineers can only land on the boxes they actually own
- Use an offline signing server if you don’t have budget for a proper Hardware Security Module
- Audit your sshd logs to see who is actually issuing these short-lived identities
Why short TTLs save your hide
Setting a long expiration on your certificates is just lazy. If you are issuing certs that last for a week, you’re asking for trouble when someone leaves their laptop at a coffee shop. Shrink that window down to an hour or less. If your team complains that they have to re-authenticate, point them to the convenience of an ssh-agent that supports auto-renewal. That’s a developer experience problem, not a security risk you should be trading away.
Check your current keys with ssh-keygen -L -f /path/to/cert. If you see expiration dates that span days or weeks, start working on an automation pipeline that keeps them under an hour. It’s the only way to ensure that stolen credentials don’t turn into a permanent back door into your infrastructure.
