Pcornel
Automation · Automation Troubleshooting

SSH Failure

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

Back to the Topic

Answer

SSH Failure isolates automation connection failures across DNS/routing, TCP/22 reachability, server availability, host-key trust, key exchange, authentication, shell/subsystem and privilege transitions.

Remember

  • TCP 22 reachable ≠ SSH negotiation or authentication succeeds.
  • SSH login succeeds ≠ remote automation command or privilege escalation succeeds.
  • Host-key acceptance ≠ user authentication.
  • Manual SSH success ≠ automation uses the same key, user, proxy or known_hosts.

First checks

  • ssh -vvv -o BatchMode=yes <host> — verbose SSH
  • ssh-keygen -F <host> — known_hosts entry
  • nc -vz <host> 22 — port reachable

Commands

ssh -vvv <user>@<host>
Read-only/validation observation for DNS/connect, host-key, authentication-method and session negotiation diagnostics.

Verify in this order

network → host key → auth → shell

Where it usually breaks

SSH success proves a session can be established for that path and identity; it does not prove the automation command, privilege transition or desired configuration succeeds.

SSH Failure troubleshooting proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Symptom / scopeTime window, immutable source/run identity, effective inputs and exact targets are explicitFloating source, changed inputs or ambiguous targets destroy reproducibility
First failed boundaryTransport/auth/dependency/render/operation evidence identifies the earliest divergenceInvestigation starts at the final error and skips earlier unproven boundaries
Effective outcomeController result is paired with target read-back and workload/service acceptanceGreen execution state or changed symptom substitutes for effective-state verification
Recovery / closureMinimal change restores the original test and regression/partial-state checks are cleanBroad retry or unrelated edits make the incident non-reproducible and hide residual state

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

Confirmation

Confirm action

Continue?