Script to send commands from a file to a list of devices (routers and switches running IOS). The output is saved in a .txt.
- Python (tested on Python 2.7 and 3.6)
- Modules
- Netmiko >= 2.2.2
- getpass
- csv
- You can use pip install -r requirements.txt to install all modules
Routers and Switches Cisco running IOS with SSH/Telnet configured (default ports 22/23)
- Same credentials for all devices
- Only SSH/Telnet with default ports (22/23)
- Last line on configuration file can not be 'exit'
- Only config that can be the same in different devices
- Install Python and the required modules
- Download this repository or copy files commands_to_send.txt, devices_to_configure.csv and send_commands.py to the same folder
- Inform port (22/23) and IP address of devices in devices_to_configure.csv file
- Put the commands that you want to send to devices in file commands_to_send.txt (it starts in config mode)
- Run pynton send_commands.py
- Inform username, password and enable
To perform backup, to enables logging, to collects information, to creates username, shut/no shut interfaces, to removes config, any other config/command that can be repeated over different devices
If you are having trouble or need help, create an issue here
All credits to Kirk Byers for making Netmiko