Use it when designing, operating or troubleshooting Linux Automation behavior around SSH. Keep target scope, execution context, operation result, platform read-back and workload acceptance as separate proof boundaries.
SSH
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.
1. SSH is the transport for Linux automation.
2. Key-based auth, dedicated automation user, sudo rules.
3. Verify host keys (known_hosts management).
4. ControlMaster for speed.
5. Jump hosts via ProxyJump.
controller → SSH key auth → host → sudo
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
target identity → TCP reachability → host-key trust → authentication → authorization/sudo → remote environment → command/file operation → exit/output → target read-back
Healthy evidence: host key and identity are controlled, non-interactive context is known, per-host results are preserved and target state is verified.
Step 2 Verification path Verify boundary
When testing SSH, include the cases that usually go wrong: wrong host, sudo/permission drift, package repository drift, service reload/restart confusion, stale files, SSH trust issues and treating exit 0 as final-evidence of the actual state.
Step 3 Failure modes and next checks Narrow the fault
Suspicious evidence: host-key checks are bypassed, agent/key context differs silently or an SSH success is treated as evidence of the requested system change.
SSH evidence establishes remote-session and command boundaries only, but it does not show that a service, package, file or workload reached the intended end state.
Step 4 Common mistakes Narrow the fault
- Disabling host key checking.
Step 5 Where it fails Narrow the fault
Trace a failure along the path it takes: inventory/host selection → transport/SSH → privilege → Linux subsystem/tool → persistent config → runtime state → independent read-back.
Typical problems with SSH: wrong host, sudo/permission drift, package repository drift, service reload/restart confusion, stale files, SSH trust issues and treating exit 0 as final-evidence of the actual state.
What to watch: host-key identity, authentication, channel/command exit semantics, timeout ambiguity and target verification.
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.
- 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.
ssh -o BatchMode=yes <host> true— non-interactive key auth worksssh-keyscan <host>— host key collection (verify!)ssh -G <host> | head— effective client config
ReferenceWhat it is1 section · depth on demand
Core model
Separate TCP reachability, SSH host identity, client authentication, account authorization, shell/non-interactive environment, command execution and remote target state.
ReferenceWhy it matters1 section · depth on demand
In depth
SSH is the transport for most Linux automation: Ansible, scripts and CI jobs connect with key-based authentication to run commands and copy files. Secure, reliable SSH configuration is therefore a prerequisite.
ssh-keygen -t ed25519 -f ~/.ssh/automation -C 'automation@ctl01'
ssh-copy-id -i ~/.ssh/automation.pub deploy@web01
ssh -o BatchMode=yes -i ~/.ssh/automation deploy@web01 true && echo ok
| Practice | Reason |
|---|---|
| Dedicated automation user and key | Audit and revocation |
BatchMode=yes in scripts | Fail instead of prompting |
| Managed known_hosts | Avoid disabling host key checking |
| SSH certificates or short-lived keys | Easier rotation at scale |
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Generic SSH protocol/security and Linux service internals remain in the relevant domains.
Mechanics
Linux Automation → SSH is owned at runtime by the automation runtime plus Linux package, account, service/systemd, filesystem, SSH and kernel-facing subsystems being managed. Follow the chain of components inventory/host selection → transport/SSH → privilege → Linux subsystem/tool → persistent config → runtime state → independent read-back and record which layer currently owns truth.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Automation > SSH. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.openssh.com/manual.html · confidence 94%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.
Quick lookup tables
SSH automation proof-boundary map
Fast scope, execution, platform-state and workload-acceptance boundaries for SSH.
| 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 |