SSH, Actually 100% signal, 0% noise.

Key Rotation

procedure
depth 2/3 − deeper + surface

Replacing an existing SSH key with a new one, either on a planned schedule or in response to a security event. Keys don't expire on their own—SSH has no built-in expiration mechanism. A key generated in 2019 works identically in 2029. This is a feature—and a risk.

When to rotate.

Event-driven rotation (do it now):

  • You suspect a private key was exposed
  • A machine with your key was stolen or decommissioned
  • You left a job and had keys on work machines
  • You changed your security posture (moving from disk-based to hardware-backed)

Scheduled rotation (reasonable cadence):

  • Disk-based keys: once a year is practical
  • Hardware-backed keys: rotation is less urgent because the key cannot be copied, but rotating when you replace hardware is good practice

How to rotate. Rotation means:

  1. Generate a new key
  2. Deploy the new public key to all servers that need it
  3. Test access with the new key
  4. Remove the old public key from all servers' authorized_keys
  5. Delete or archive the old private key locally

The critical step is 3 before 4. Test before you revoke. Otherwise a mistake in deployment locks you out.