06-13-2022 06:12 AM
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
06-13-2022 06:45 AM
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
06-13-2022 12:12 PM
I have tried wit python and paramiko, but did not work on jumpserver of the businessworkbook.
06-13-2022 12:19 PM
What exactly didn't work ?
Jon
06-13-2022 12:53 PM
I could not install the paramiko package
06-13-2022 01:02 PM
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
06-13-2022 01:12 PM
okay, I am going to copy all info here, tomorrow, after I started my workbook
06-13-2022 06:48 AM
There is good tool you can use with Python :
06-13-2022 12:14 PM
unfortunately python does not work, but thanks
06-14-2022 02:29 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide