Pcornel
Automation · Secrets & Credentials

SSH Keys

Cheat sheet · https://pcornel.dk/topic.php?topic=5893

Back to the Topic

Answer

SSH Keys used by automation are asymmetric credentials whose safety depends on private-key custody, public-key placement, host trust, algorithm strength, principals/options, rotation and provable removal of obsolete keys.

Remember

  • Private key encrypted ≠ private key access appropriately restricted.
  • Public key present ≠ correct account or restrictions applied.
  • SSH connection succeeds ≠ host identity verified.
  • New key added ≠ old key removed.

First checks

  • ssh-keygen -l -f key.pub — fingerprint/type
  • SSH CA-signed certificates (ssh-keygen -s) — short-lived certs
  • authorized_keys inventory — cleanup

Verify in this order

private key/cert → SSH → target authorized

Where it usually breaks

SSH-key evidence proves the tested identity/trust path and key lifecycle; it does not prove remote command authorization or host compromise absence.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5893

Confirmation

Confirm action

Continue?