Subscribe to the Non-Human & AI Identity Journal

How should security teams govern SSH keys in cloud and server environments?

Treat SSH keys as governed non-human identities. Assign an owner, define an expiry or rotation interval, track where the key is trusted, and revoke it when the access relationship ends. The key control is lifecycle discipline, because an unused but valid key is still an active credential. Central visibility matters as much as the algorithm choice.

Why This Matters for Security Teams

SSH keys are not just admin convenience artifacts. In cloud and server estates they function as governed Non-Human Identities, which means each key represents a standing trust relationship that can outlive the person or automation that created it. That is why lifecycle control matters more than key length or algorithm choice. NHI Management Group’s Ultimate Guide to NHIs — Lifecycle Processes for Managing NHIs and the NIST Cybersecurity Framework 2.0 both point to the same practical reality: if ownership, expiry, and revocation are not explicit, the key remains a live access path.

This is where teams often underestimate risk. A valid SSH key can bypass password controls, weaken segmentation, and persist across cloud instances, CI jobs, jump hosts, and recovery accounts. Visibility also tends to fragment: the key may be stored in one system, trusted by several servers, and embedded in automation nobody actively reviews. The result is an access graph that security teams cannot easily explain during audit or incident response. NHI Management Group’s Top 10 NHI Issues highlights lifecycle gaps as a recurring problem across non-human access, not just API tokens or cloud secrets. In practice, many security teams discover stale SSH keys only after a server is compromised or a contractor has already left the environment.

How It Works in Practice

Governing SSH keys well starts with treating them as inventory items with an owner, purpose, scope, and end date. That means recording who approved the key, which hosts accept it, what account it unlocks, and what business function depends on it. Current guidance suggests pairing that inventory with automatic renewal or replacement, rather than allowing keys to persist indefinitely. For many environments, the operational target is not “never use SSH keys,” but “make every key short-lived, attributable, and revocable.”

Practitioners usually combine four controls:

  • Assign ownership to a person or system owner, not a shared team mailbox.
  • Use expiry or rotation intervals so the key cannot survive indefinitely.
  • Track trust locations, including servers, bastions, containers, and break-glass accounts.
  • Revoke the key when employment, vendor work, or automation scope ends.

Where possible, use central visibility to correlate the key with its actual use. That can include command logging on hosts, access reviews, and detection for keys that authenticate from unexpected networks or through unexpected automation. The cloud environment matters here because SSH keys frequently get copied into images, user-data scripts, and pipeline variables. That is why the 2024 Non-Human Identity Security Report is notable: 88.5% of organisations say their non-human IAM practices lag human IAM, and 59.8% see value in dynamic ephemeral credentials. When SSH access is supported by ephemeral issuance or tightly controlled certificate-based SSH, teams reduce the chance that a stolen key remains useful for weeks or months. These controls tend to break down in legacy estates where shared accounts, unmanaged bastions, and image-level key embedding make it impossible to confirm every place the key is trusted.

Common Variations and Edge Cases

Tighter SSH governance often increases operational overhead, requiring organisations to balance access speed against auditability and revocation certainty. That tradeoff becomes more visible in legacy Unix fleets, emergency admin workflows, and third-party support access, where a rigid rotation schedule can disrupt incident response if no alternate path exists. Best practice is evolving, but there is no universal standard for this yet: some teams move to SSH certificates with short TTLs, while others retain static keys only for constrained break-glass use.

Two edge cases deserve extra care. First, automation keys used by deployment pipelines often look “service-like” but still behave as non-human credentials, so they need separate ownership and rotation from human admin keys. Second, long-lived trusted-host relationships can hide the real exposure if the same key is reused across dozens of servers. In those cases, revocation is only effective if the team can prove where the key was deployed. NHI Management Group’s Ultimate Guide to NHIs — Regulatory and Audit Perspectives is useful when documenting why key ownership and expiry are audit requirements rather than optional hygiene. For environments with federated cloud operations, the challenge is amplified because trust is distributed across hosts, regions, and vendors, and the key often survives in forgotten automation long after the original access need has ended.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-03 SSH key rotation and expiry directly address stale credential risk.
NIST CSF 2.0 PR.AC-1 SSH keys are access credentials that must be managed and limited.
NIST AI RMF AI RMF supports governance, accountability, and lifecycle risk handling for automated access.

Define ownership, review cadence, and revocation triggers for every SSH key as a governed identity.