Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

SSH Keys

Direct 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.

When to use this

Use it when handling automation credentials around SSH Keys. Keep credential owner/purpose, secret value custody, retrieval identity, target privilege, runtime exposure, rotation/revocation and verified rejection as separate proof boundaries.

First 30 seconds

1. SSH keys for automation: ed25519, per purpose, protected.

2. Prefer SSH certificates with short validity.

3. Restrict with from= and command= where possible.

4. Inventory and remove old keys.

5. Store private keys in vault.

Operational verification

private key/cert → SSH → target authorized

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
automation secrets and credential management
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformautomation secrets and credential management · SSH Keys owns raw SSH credential handling. Automation Security → SSH Key Management owns governance/hardening across fleets; Security/IAM and platform SSH branches own deeper protocol and host configuration.
Scope / prerequisiteUse it when handling automation credentials around SSH Keys. Keep credential owner/purpose, secret value custody, retri…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

automation SSH identity → key/certificate issuance → private-key custody → host trust → authorized key/principal restrictions → SSH authentication → command privilege → audit/session evidence → key replacement → old-key removal → rejection test

Healthy evidence: keys are dedicated and fingerprint-inventoried, host identity is verified, private material is tightly protected and obsolete keys are removed and rejected.

Step 2 Failure modes and next checks Narrow the fault

Suspicious evidence: one private key is copied widely, host verification is disabled, authorized_keys contains unknown keys or old fingerprints remain valid after rotation.

SSH-key evidence shows the tested identity/trust path and key lifecycle, but it does not show remote command authorization or host compromise absence.

Step 3 Common mistakes Narrow the fault
  • Shared SSH keys.
Step 4 Where it fails Narrow the fault

Where SSH Keys usually goes wrong: host-key identity, authentication, channel/command exit semantics, timeout ambiguity and target verification.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • 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.
Key checks
  • ssh-keygen -l -f key.pub — fingerprint/type
  • SSH CA-signed certificates (ssh-keygen -s) — short-lived certs
  • authorized_keys inventory — cleanup
ReferenceWhat it is1 section · depth on demand

Core model

Generate a dedicated keypair or SSH certificate identity for a named automation purpose, protect the private key or signing capability, restrict authorized principals/commands/source where supported, verify host identity, use an agent or ephemeral injection rather than files when possible, and rotate by proving both new access and old-key removal.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

SSH Keys owns raw SSH credential handling. Automation Security → SSH Key Management owns governance/hardening across fleets; Security/IAM and platform SSH branches own deeper protocol and host configuration.

In depth

SSH keys authenticate automation to Linux hosts and network devices. Ed25519 keys are the modern default; the private key must be protected and the public key distributed only where needed.

ssh-keygen -t ed25519 -C 'ansible@ctl01' -f ~/.ssh/ansible
# restrict a key on the target
from="10.0.0.5",no-agent-forwarding,no-port-forwarding ssh-ed25519 AAAA... ansible@ctl01
PracticeReason
Separate keys per automation systemRevocation
from= restrictions in authorized_keysOnly from the control node
SSH certificates (CA-signed, short validity)Scales better than key lists
Inventory of authorised keysRemove stale access
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docautomation secrets and credential management current

Authoritative/upstream documentation reviewed for bounded claims in Secrets & Credentials > SSH Keys. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
ssh keys automationautomation private keyssh credential rotation
Embedded reference data

Quick lookup tables

SSH Keys credential proof-boundary map

Fast identity, handling/execution, effective-outcome and closure proof boundaries for SSH Keys.

BoundaryHealthy evidenceSuspicious evidence
Ownership / sourceCredential owner, purpose, consumers and authoritative store/issuer are explicitShared or orphaned credentials exist outside a controlled source with unclear consumers
Retrieval / exposureWorkload retrieves only required material and plaintext exposure is transient and boundedSecrets leak to source, logs, command lines, artifacts, caches, child processes or unrelated jobs
Effective outcomeTarget-side authentication/authorization or secure control outcome is independently observedTool/job success substitutes for target authorization, effective state or workload proof
Closure / next actionRotation/revocation, denied-path tests, audit evidence and residual exceptions are explicitOld credentials remain valid, policy bypass exists, audit gaps are unknown or broad success is inferred from one signal
Confirmation

Confirm action

Continue?