Python Forum
Python script for show commands-CISCO Devices - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: Python script for show commands-CISCO Devices (/thread-6918.html)



Python script for show commands-CISCO Devices - babbarsher - Dec-13-2017

Hello All,

This is my first post and I am pretty rookie in python world. I am trying to create network script which will help me to capture show commands output for CISCO devices and store output in files.

I tried to run few scripts from internet but those are somewhat static scripts where variables like IP Addresses, show commands & username/password need to be stored under different .txt files and those filenames will be invoked as parameter while running the script in CLI.

I am looking for way where IP addresses, show commands & username/password can be entered dynamically while running the script as those parameter value will differ everytime.

Could someone please guide me over here or any sample would be enough.


RE: Python script for show commands-CISCO Devices - Larz60+ - Dec-13-2017

see the paramiko package:  https://pypi.python.org/pypi/paramiko/2.4.0
an example of it's use: https://stackoverflow.com/questions/20766274/print-ssh-output-from-cisco-router-to-a-text-file