cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1354
Views
0
Helpful
9
Replies

ssh automate on multiple switches

hi all,

I am looking to automate ssh on multiple cisco switches with bash script, and after the login, can execute commands, like:

conf t
vlan 10

name IT

end

wr

ex

Anybody know if there are some good scrips, or examples anywhere to get me started?

Many thanks in advance

 

 

 

9 Replies 9

Jon Marshall
Hall of Fame
Hall of Fame

 

Does it have to be shell script because for this sort of thing Python is becoming the choice of scripting language. 

 

There is also a module written for Python called Netmiko which deals specifically for automating logging into network devices - 

 

https://pynet.twb-tech.com/blog/netmiko-python-library.html

 

Jon

I have tried wit python and paramiko, but did not work on jumpserver of the businessworkbook.

 

What exactly didn't work ? 

 

Jon

I could not install the paramiko package

 

Difficult to say without understanding what OS you are trying it on, what the error message was etc. 

 

You can find examples of using shell scripts with a bit of searching but honestly sorting out your Python install would make a lot more sense in the long run if you want to look at more automation. 

 

Jon

okay, I am going to copy all info here, tomorrow, after I started my workbook

 

balaji.bandi
Hall of Fame
Hall of Fame

There is good tool you can use with Python :

 

https://github.com/albertsuwandhi/Cisco-Tools

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

unfortunately python does not work, but thanks

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: