Netmiko SSH Automation — portable workflow
Safe Python Netmiko patterns for read-only collection, bounded batch SSH, TextFSM parsing, guarded config changes, timeouts, and network automation error handling. Use when automating network device access with Python Netmiko, whether collecting state or pushing guarded config changes.
Use it only when the request supplies this domain, framework, data source or artifact; a shared keyword is not a match. Related skills, each for its own concern: bosskuai-network-bgp-diagnostics, bosskuai-dart-flutter-patterns, bosskuai-browser-automation, bosskuai-cisco-ios-patterns, bosskuai-network-config-validation, bosskuai-network-interface-health.
Workflow
Read the source workflow first, then work through these sections in order:
- Safety Defaults.
- Read-Only Connection Pattern.
- Batch Collection.
- Structured Parsing.
- Guarded Config Pattern.
- Review Checklist.
- Resolve its
scripts/,references/,assets/and template paths againstreferences/upstream/, not the project root. Source skill names map through SOURCE.json (bossku skills show <id>). ECC slash commands, agent names and package-root paths are not installed: use what this host has, or say what is missing. - Check the Python version (
python --version) and the Netmiko version (pip show netmiko) first, and the latest Netmiko release on PyPI at work time. Check each device's software version with its vendor's command (for exampleshow versionon Cisco and Junos,display versionon Huawei and H3C,show system infoon Palo Alto), then the source prerequisites. The source batch example runsshow versionon every device, so run the vendor's command there too. A documented command is an example, not permission to install packages, add an account, expose secrets, upload private content or change an external service. - Research and review do not authorise signing, trading, booking, purchase or wallet access. Keep any transaction behind an exact operation scope and the user's approval, and never copy or expose private keys.
Done when
Complete the source “Review Checklist” procedure for this task. Keep its resulting artifact, command output or cited evidence, and state what remains unverified.
If an input, provider, runtime or authorisation is missing, stop that step, carry on with read-only analysis, and say exactly what is missing. A generated plan alone is not completion.
Test the script on a lab device first, with a wrong password and an unreachable host. Catch NetmikoTimeoutException and NetmikoAuthenticationException, and log each device's result.
Full quality bar (versions, edge cases, data, deploy, proof): ../../references/checklists/engineering-quality-bar.md.
Adapted from the locally reviewed affaan-m/ECC snapshot: provenance and hashes in SOURCE.json, the original text and resources in references/upstream/ under its MIT licence. Copyright (c) 2026 Affaan Mustafa.