Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

SSH Failure

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

When to use this

Use it when the symptom is “SSH Failure”: work through the layers in order and stop at the first one that fails.

First 30 seconds

1. SSH failure: network/port, host key change, key not authorised, wrong user, algorithms.

2. Verbose SSH.

3. Check host key changes (security!).

4. Check authorized_keys.

5. Fix and retry.

Operational verification

network → host key → auth → shell

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
automation troubleshooting and failure analysis
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 troubleshooting and failure analysis · SSH Failure owns generic automation SSH isolation; deep SSH protocol/security and target OS configuration stay with Network/Security/Linux/Windows branches. · OpenSSH
Key commandssh -vvv <user>@<host>
Scope / prerequisiteUse it when the symptom is “SSH Failure”: work through the layers in order and stop at the first one that fails.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

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

6 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

inventory target → DNS/route → TCP reachability → SSH negotiation → host-key trust → user authentication → session/subsystem → privilege → remote command → target read-back

Healthy evidence: resolved target, host key and user/key are explicit, negotiation/auth logs agree, non-interactive command execution works, and target state is verified.

Step 2 Telling causes apart Verify boundary

Known-good is a verbose transcript that connects to the intended host, validates the expected host key, negotiates an approved algorithm set, authenticates the intended user and opens the required session/exec channel; then the same automated remote command succeeds. Broken state is a repeatable failure at one named SSH phase. An established SSH session shows transport plus SSH authentication/channel setup only, not the success of the command or workflow executed through it.

Step 3 Common mistakes Verify boundary
  • Host key changes ignored by disabling checking.
  • Wrong key or user for the target.
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: host keys are blindly disabled, manual login is treated as equivalent to runner context, or repeated retries hide routing, algorithm or sudo failures.

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

Step 5 Observation-driven branch and next-check logic Narrow the fault

Run ssh -vvv <user>@<host> from the same control node and read the transcript in order. If connection setup times out/refuses, inspect DNS/route/firewall/listener; if negotiation stops on host key or algorithms, compare known_hosts and supported crypto; if authentication fails, inspect offered identities/account policy; if an interactive session works but automation does not, compare proxy options, batch mode, environment and remote command/shell. If the session status is failed at any phase, inspect that phase before moving on; otherwise compare the automated exec channel with the interactive path. Do not treat a successful ping as evidence that SSH itself is healthy.

Step 6 Where it fails Narrow the fault

Where SSH Failure 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
  • 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.
Key checks
  • ssh -vvv -o BatchMode=yes <host> — verbose SSH
  • ssh-keygen -F <host> — known_hosts entry
  • nc -vz <host> 22 — port reachable
ReferenceWhat it is1 section · depth on demand

Core model

Resolve the exact target and route; test TCP reachability; capture SSH negotiation and host-key identity; identify chosen user/key/agent; verify server auth logs; distinguish connection, host-key, authentication and post-login command/sudo failures; correct the first failed layer and rerun the original remote operation.

ReferenceHow it works1 section · depth on demand

How it works and how it fails

SSH Failure spans name resolution and TCP reachability, host-key negotiation, algorithm compatibility, user authentication and remote session/channel startup. Automation often adds proxy/jump hosts, noninteractive key agents and strict host-key policy, which can differ from an operator's shell. The SSH client owns the protocol transcript; the remote command executed afterward is a separate consumer of the established channel.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

SSH Failure owns generic automation SSH isolation; deep SSH protocol/security and target OS configuration stay with Network/Security/Linux/Windows branches.

In depth

An SSH failure in automation happens at a specific stage: connection, key exchange, host key check, user authentication or channel/command. The client's verbose output shows which.

ssh -vvv -o BatchMode=yes -i ~/.ssh/automation deploy@web01 true
nc -zv web01 22
MessageCause
Connection timed outNetwork, firewall
Host key verification failedHost rebuilt or MITM; update known_hosts deliberately
No matching key exchange/cipherOld device needs legacy algorithms
Permission denied (publickey)Key not authorised or wrong user
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 troubleshooting and failure analysis current

Authoritative/upstream documentation reviewed for bounded claims in Automation Troubleshooting > SSH Failure. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/azure/architecture/patterns/retry · 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 automation failuressh connection automationremote ssh error
Embedded reference data

Quick lookup tables

SSH Failure troubleshooting proof-boundary map

Fast symptom/scope, first-failed-boundary, effective-outcome and recovery/closure map for SSH Failure.

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
Confirmation

Confirm action

Continue?