Use it when configuring, checking or troubleshooting SSH Automation in Network Automation.
SSH Automation · Network Automation
SSH Automation uses authenticated encrypted sessions to execute network management operations, commonly CLI commands or subsystem protocols, against selected devices.
controller → SSH → device CLI
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
inventory target → DNS/address/TCP → SSH negotiation/host key → authentication → authorization → channel/subsystem → command/RPC result → device state verification
Healthy evidence: the expected host key, user, auth method and privilege produce bounded sessions and the resulting target state matches intent.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: host-key checking is bypassed, sessions use unexpected identities, commands hang/timeout or success is inferred solely from channel closure.
SSH shows a management transport/session boundary, but it does not show command semantics, configuration persistence or network service correctness.
Step 4 Where it fails Narrow the fault
Where SSH Automation usually goes wrong: 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 authenticated.
- SSH authenticated ≠ command authorized.
- Host-key acceptance ≠ host identity trustworthy when trust-on-first-use or stale keys are involved.
- Command exit/channel success ≠ intended network state.
ssh -o BatchMode=yes <user>@<device> 'show version'— SSH works non-interactively- Host key verification — security
- Netmiko/Scrapli/ansible network_cli — libraries
ReferenceWhat it is1 section · depth on demand
Core model
Keep DNS/address resolution, TCP reachability, host-key trust, user authentication, authorization, session/channel setup and remote command result as separate boundaries.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Deep SSH protocol/security governance and device CLI semantics remain with the relevant domains.
In depth
SSH automation drives network devices through their CLI over SSH using libraries like Netmiko, Scrapli or Ansible's network_cli. It works with nearly every device but must handle prompts, paging and unstructured text output.
from netmiko import ConnectHandler
with ConnectHandler(device_type="cisco_ios", host="sw01", username=u, password=p) as c:
out = c.send_command("show ip interface brief", use_textfsm=True) # parsed list of dicts
c.send_config_set(["interface Gi1/0/10", "description AP-12"])
c.save_config()
| Challenge | Mitigation |
|---|---|
| Unstructured output | TextFSM/Genie parsers |
| Slow devices | Increase read timeouts |
| Host key prompts | Known hosts management |
| Partial config on error | Validate first, use config replace where possible |
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 Network Automation > SSH Automation. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://developer.cisco.com/site/networking/ · 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 Network Automation proof-boundary map
Fast intent/scope, management-operation, device-state and network-acceptance boundaries for SSH Automation.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Intent / scope | Source revision and exact targets are explicit | Stale inventory, hidden selector or wrong variables change scope |
| Management operation | Transport/model/payload and per-device response are traceable | Auth/capability/parser differences hide partial or wrong execution |
| Device state | Effective and persistent state are read back | Accepted config/API result is mistaken for convergence |
| Network proof | Original control/data-plane or service test passes | Automation summary substitutes for actual network acceptance |