cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Network Automation Solution : How to save configuration file of Cisco Router/Switch devices using Python Script

1422
Views
0
Helpful
0
Comments

import netmiko
from netmiko import ConnectHandler
device = ConnectHandler(device_type="cisco_ios", ip="DEVICE IP", username="USERNAME", password="PASSWORD")
output1 = device.send_command("show running-config")
save_file = open("Switch_running.txt","w")
save_file.write(output1)
save_file.close()
device.disconnect()

#python#automation#

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards