netmiko-ssh-automation
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.
- Kind
- Skill
- Works with
- Claude Code, Codex
- Languages
- Python
- Source
- affaan-m/ECC @ d3b8a3e90890
- Path
- skills/netmiko-ssh-automation/SKILL.md
- License
- MIT
- Jobs
- Automation, Debugging
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Netmiko SSH Automation Use this skill when writing or reviewing Python automation that connects to network devices with Netmiko. Keep the default path read-only; config changes need a separate change window, peer review, and rollback plan. ## When to Use - Collecting `show` command output across routers, switches, or firewalls. - Building a small audit script for interface, routing, or config evidence. - Adding timeouts and exception handling to network SSH scripts. - Parsing command output with TextFSM when a template exists. - Reviewing automation before it touches production devices. ## Safety Defaults - Start with read-only `send_command()` collection. - Keep inventory small and explicit; do not sweep whole address ranges. - Use environment variables, a vault, or `getpass`; never hardcode credentials. - Set connection and read timeouts. - Limit concurrency so older devices are not overloaded. - Require an explicit operator flag before `send_config_set()`. - Do not call `save_config()` until the change has been verified and approved. ## Read-Only Connection Pattern ```python import os from getpass import getpass from netmiko import ConnectHandler …