Automation · Linux Automation
SSH
Cheat sheet · https://pcornel.dk/topic.php?topic=5651
Answer
SSH in Linux Automation provides remote command and file-transfer reachability to Linux targets, including host-key trust, authentication, authorization, shell/session behavior and remote exit evidence.
Remember
- TCP/22 reachable ≠ SSH host identity trusted.
- SSH authenticated ≠ requested command authorized.
- Interactive shell success ≠ non-interactive automation environment equivalent.
- Remote exit code 0 ≠ desired Linux state verified.
First checks
ssh -o BatchMode=yes <host> true— non-interactive key auth worksssh-keyscan <host>— host key collection (verify!)ssh -G <host> | head— effective client config
Verify in this order
controller → SSH key auth → host → sudo
Where it usually breaks
SSH evidence establishes remote-session and command boundaries only; it does not prove that a service, package, file or workload reached the intended end state.
SSH automation proof-boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Scope / identity | Exact source revision, hosts and execution identity are explicit | Selector drift, stale inventory or wrong token changes scope/authority |
| Operation | Tool/provider action and per-host result are traceable | Partial failure, hidden error semantics or environment differences are lost |
| Platform state | Persistent and effective state are read back | Command/cmdlet success is mistaken for convergence |
| Workload proof | Original service/application acceptance passes | Automation summary substitutes for actual runtime behavior |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5651