Join our Newsletter — 33% off our NHI Course
Home› Glossary› NHI Lifecycle Management› SSH Key Revocation
NHI Lifecycle Management

SSH Key Revocation

← Back to Glossary
By NHI Mgmt Group Updated October 31, 2026 Domain: NHI Lifecycle Management

The process of removing authorization for an SSH key that can no longer be trusted. In this context, revocation is required because patching the client does not undo exposure. Administrators must also replace the key pair and confirm that no dependent authentication paths still accept the compromised key.

What SSH key revocation actually does

SSH key revocation removes trust in a key that was previously accepted for authentication. It is not a cosmetic cleanup step, it is the control that stops a still-valid key from being used after compromise, offboarding, or policy change. For SSH deployments that use certificates, revocation can also mean invalidating certificate authority trust or a revocation list entry.

Because SSH access is often embedded in automation, jump hosts, CI/CD, and administrator workflows, revocation must be treated as an access-control event, not just a key-management task. A revoked key should no longer be accepted anywhere that still trusts the old key material or a stale authorized_keys entry.

Why revocation matters after exposure

Once an SSH private key is exposed, an attacker may be able to authenticate directly until the trust path is removed. That makes revocation materially different from patching a client or hardening a server, because the stolen key remains usable unless the relying systems stop honoring it.

In practice, the danger is persistence. A forgotten deploy key, a copied authorized_keys entry, a cached key in an automation job, or a stale certificate trust rule can keep the access path alive long after the original incident. Leaked Credential and Secret Incident Response Playbook is a useful reference for the broader revoke-and-rotate pattern, because SSH key revocation is usually one step in a larger response sequence.

How organisations confirm the key is no longer trusted

Effective revocation starts with finding every place the key can still authenticate. That includes host-level authorized_keys files, bastion hosts, automation accounts, GitHub deploy keys, CI runners, and any certificate authority or known_hosts trust path that may still accept the old credential.

Reviewing asset inventory and key ownership is essential because revocation fails when the organisation only removes one copy of the key. SSH Key and SSH Certificate Management Guide is the natural parent topic for key sprawl, orphaned keys, bastions, and removal of unused access paths, while How to find unused GitHub deploy keys and SSH keys helps with the practical discovery side when keys are embedded in platform workflows.

Replacement, detection, and the post-revocation cleanup

Revocation should be paired with replacement, because the goal is not only to block the old key but to preserve continuity with a fresh trust path. That may mean issuing a new key pair, updating certificates, or migrating to short-lived SSH certificates where the trust boundary is easier to enforce and expire.

After the key is removed, teams should check for signs that the old key was already used by an intruder. That includes shell history, unusual login times, unexpected changes to authorized_keys, new persistence mechanisms, and activity from systems that should have stopped authenticating. MITRE ATT&CK T1098 Account Manipulation Guide is relevant because SSH authorized_keys abuse is a common persistence pattern, and osquery Guide is useful when you need host visibility to confirm whether keys remain present or active on endpoints.

Certificate revocation and trust-path control

When SSH certificates are used, revocation is often about controlling certificate authority trust rather than only deleting one public key. In that model, an organisation may need to revoke a certificate, retire a CA key, or update revocation lists so that previously issued certificates cannot continue to work.

This is why certificate governance matters as much as key handling. SSH Protocol and Certificate Authority Guide explains certificate fields, principals, CA custody, and KRL revocation, while the CA/Browser Forum is a useful external reference for revocation as a trust-maintenance concept, even though SSH certificate operations are distinct from public web PKI.

Risk and Threat Considerations

SSH key revocation is high-stakes because a compromised key can provide durable access without triggering password reset workflows or client patching. If revocation is incomplete, an attacker can keep using old trust paths, especially where keys are duplicated across systems or embedded in automation.

Failure mechanism: The old key remains accepted on one or more hosts, in an automation secret store, or through a certificate trust rule that was not updated.

Impact: The attacker preserves authenticated access, which can lead to lateral movement, persistence, data access, and repeated re-entry even after the incident appears to be contained.

Standards & Framework Alignment

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

MITRE ATT&CK addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementSSH key revocation is authenticator lifecycle control for a key used to authenticate users or systems.
IA-2 — Identification and Authentication (Organizational Users)SSH keys often authenticate privileged organizational users over remote sessions.
IA-9 — Identification and Authentication (Non-Organizational Users)SSH keys may authenticate external admins, contractors, or services that require controlled access.
Recommendation — Revoke, replace, and track SSH authenticators across their full lifecycle. Ensure revoked SSH keys cannot be used to authenticate privileged users. Apply revocation controls consistently to external and service SSH authentication paths.
CIS Controls v8CIS-5 — Account ManagementSSH key revocation is part of removing access and disabling stale authentication paths.
Recommendation — Remove stale SSH keys and confirm all related accounts and access paths are disabled.
MITRE ATT&CKT1098 — Account ManipulationSSH authorized_keys abuse is a persistence and privilege-maintenance technique covered by T1098.
Recommendation — Hunt for added or altered SSH keys as part of account-manipulation detection.

Practitioner Guidance

Why practitioners should care: SSH key revocation is only effective when the complete trust path is removed, including duplicate keys, inherited access, and stale automation references. Treat it as both a security response and an inventory problem.

Common misunderstanding: Deleting one public key entry does not necessarily revoke access if the same key was copied elsewhere, stored in a CI/CD secret, or reintroduced through a certificate authority or golden image.

Practitioner takeaway: After revoking the key, verify the absence of every dependent authentication path before declaring the exposure closed.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org