umbelivable! I'm dev in migration to InfraSctucture area. That's amazing! using Python to automatize a bunch of dailly tasks really makes me smile at this side of the screen. Thanks for this!
@kimberly1712511 ай бұрын
thank you for the great tutorial!
@dookieduckie6 ай бұрын
Thank you for this tutorial this is cool stuff
@WhereAmEye21873 жыл бұрын
Wow! This is awesome! What is a real-world example of when something like this would be used instead of just logging in directly and performing the commands on the network device? Also, could you make a video showing how to write a script that will ssh into multiple devices (more than 20) in one action?
@FoodWoW13 жыл бұрын
Running a script for multiple devices. Of course if you only have 1 device to check it's easier to just log into it. But if you're checking something, or making changes on 30 devices, you can do it all at once by altering a few lines of code.
@dreamsneezer86682 жыл бұрын
There aren’t many, if your not using dhcp it’s hard to get around addressing so maybe a python loop to connect to each device and entering addresses that way, you could use a good config as a template and transfer that onto the devices first to simplify all of the default configurations you need to make. You can also write config commands in a text editor and drag and drop them into the cli this is fast and easy as long as you don’t have a shit ton of devices.
@dreamsneezer86682 жыл бұрын
I’d say configure a switch and router as far as you can, save the configuration files in a .txt and as the running-config on the devices then just transfer them and use dhcp.
@benbunor2 жыл бұрын
can you sh run int range in this manner?
@au10ticity3 жыл бұрын
how would you go about grabbing the existing user logged in and then prompt for a password instead of typing in the info in the script?
@MyITWorkshop3 жыл бұрын
Hello, In order to get the user that is currently logged to the device you would need to connect to it first. I agree adding the username and password to the script is not at all secure. This example was just to show that is possible to automate the process. A more secure way would be coding it in VS code and use the python library "getpass" and make users to type username and password before every session. Hope it helps Thanks for the comment!
@au10ticity3 жыл бұрын
@@MyITWorkshop thanks for replying.. I was implying in a LDAP environment, but this is good info.
@samueladepoju87173 жыл бұрын
Great job
@nguyenhoanganh6089 Жыл бұрын
how does router and python can connect together ?
@MyITWorkshop Жыл бұрын
Hello, That’s possible using the Netmico library for python.
@kracksmith4ejm19 ай бұрын
real action starts at 5:50
@ikhwanhuzirislakh68452 жыл бұрын
HI, I tried the the script however its returning "ValueError: Failed to enter enable mode. Please ensure you pass the 'secret' argument to ConnectHandler". I am trying to use radius account configured in my switch and the account is actually not high privilege level. So how do I bypass this enable mode? Thanks for the script provided.
@generalrojs68352 жыл бұрын
Maybe you are missing command Connect.enable() and see if your switch has configured ssh connection on vty lines.