Python script to send commands to any number of Cisco devices.
Uses a CSV file to import which devices to configure and a simple text file with commands to run.
Useful for deploying configuration or running show commands to gather information.
- Python 3.12.6 (but probably works on earlier releases too).
- See requirements.txt for required modules.
- Supports switches running both IOS-XE and IOS software.
- Supports both SSH and Telnet connections.
- Supports both IP and DNS names to connect to network device.
- Includes prompt coloring to make script easier to read.
- Saves the results into a log textfile.
- Install Python.
- Install modules found in requirements.txt.
- Use "pip install -r requirements.txt" to install all modules automatically.
- Configure CSV file with port/service and IP address/hostname of network devices.
- Configure text file commands_to_send.txt with commands to send to network devices.
- Run send_commands.py to start the script.
- Enter username, password (and optionally enable password, see comments in configure_accessport.py).
- Confirm you want to push commands to X devices.
- Commands are executed on network devices one by one and logged to textfile.
- At the end of script, user is informed of failed connections (if any).
- No support is given for this script.
- Always test the script in a test environment before trying it in a production environment.
- Use at your own risk.
Preview of number of devices that will be configured and asks to proceed.
User must type "yes" to confirm script start.

Configuration is automatically saved on the network device after commands are executed.

Built-in error handling for unreachable devices, wrong credentials, and more.

Inspired by/built upon andreirapuru/netmiko_send_commands
