Interview › Security & DevSecOps
How do you manage and rotate SSH and API keys at scale? [Advanced]
Answer
At scale, I manage SSH and API keys by reducing static keys, centralizing issuance, enforcing short lifetimes, rotating automatically, inventorying ownership, detecting unused keys, and using alternatives such as SSO, certificates, OIDC, and workload identity.
Technical explanation
For SSH, prefer short-lived SSH certificates or SSO-backed access over permanent authorized_keys sprawl.
For API keys, store them in a secret manager, assign owners, rotate on schedule, and alert on unusual use.
Keys should have least privilege, expiration, environment scope, and automated revocation when employees or services offboard.
Hands-on example
Hands-on: replace long-lived bastion SSH keys with Teleport or OpenSSH certificates valid for 8 hours. For cloud APIs, remove static IAM user keys and use OIDC/workload identity. Run a weekly job that flags keys older than 90 days or unused for 30 days.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Security & DevSecOps interview questions
- What is the difference between a WAF, an IDS, and an IPS? [Advanced]
- How do you prove to an auditor that security controls are enforced continuously, not just documented? [Advanced]
- Why do you hash and salt passwords rather than encrypt them? [Advanced]
- What is the difference between encoding, encryption, and hashing? [Advanced]
- How do you prevent privilege escalation in a Kubernetes cluster? [Advanced]
- What are Kubernetes Pod Security Standards (privileged, baseline, restricted)? [Advanced]
- What are Linux capabilities, and why drop them in containers? [Advanced]
- What is the difference between authentication and authorization? [Advanced]