How do you manage SSH access to 500 Linux servers without distributing static keys?
IntermediateScenarioSecrets and Identity Management
Answer
Situation read → authorized_keys sprawl means nobody knows who can log in where.
What I'd do →
- Replace SSH with SSM Session Manager or an access proxy (Teleport, Boundary) where possible; port 22 closed.
- Where SSH stays, use short-lived SSH certificates from Vault SSH CA:
vault write ssh-client-signer/sign/ops public_key=@id_ed25519.pub. - Servers trust the CA via
TrustedUserCAKeysinsshd_config; no per-user keys on hosts. - Disable password auth and root login.
- Record sessions and ship logs centrally.
Why → Certificates expire on their own, so offboarding is automatic.
Interview tip → "SSH certificates, not keys" is the key phrase.
More on Secrets and Identity Management
A team stores database passwords in a `.env` file committed to a private repo. How do you migrate them out?BeginnerYour CI pipeline uses long-lived AWS access keys stored as repository secrets. How do you replace them?IntermediateAn auditor asks how often you rotate database credentials. You currently never do. What do you build?IntermediatePods need AWS access. A developer mounted an IAM user's keys as a Kubernetes Secret. What do you propose instead?BeginnerShould you use Kubernetes Secrets, Sealed Secrets, External Secrets Operator or the Secrets Store CSI driver?IntermediateA Slack webhook URL and a Stripe live key were posted in a public GitHub issue. What is your response sequence?Beginner