๐๐ผ๐ฟ ๐๐ผ๐บ๐ฝ๐น๐ฒ๐๐ฒ ๐ฃ๐๐๐ต๐ผ๐ป ๐๐ผ๐ฟ ๐ก๐ฒ๐๐๐ผ๐ฟ๐ธ ๐๐ป๐ด๐ถ๐ป๐ฒ๐ฒ๐ฟ๐ ๐๐ผ๐๐ฟ๐๐ฒ:
๐๐ป๐ฟ๐ผ๐น๐น ๐ณ๐ผ๐ฟ ๐ฏ๐ฒ๐น๐ผ๐ ๐จ๐ฑ๐ฒ๐บ๐ ๐๐น๐ฎ๐๐: ๐๐๐๐ ๐๐๐ซ๐ฌ๐ข๐จ๐ง
๐ซ๐๐๐๐๐๐๐๐๐ ๐น๐๐๐๐๐๐๐ ๐ณ๐๐๐:
https://www.udemy.com/course/python-for-network-engineers/?referralCode=35A75AAE1ACA94A15829 This video demonstrates how to ssh to list of devices from text file.
from netmiko import ConnectHandler
with open('15_devices') as IP_LIST:
for IP in IP_LIST:
RTR = {
'ip': IP,
'username': 'admin',
'password': 'admin',
'device_type': 'cisco_ios',
}
net_connect = ConnectHandler(**RTR)
with open('15_config') as CONFIG_LINES:
CONFIG = CONFIG_LINES.read()
output = net_connect.send_config_set(CONFIG)
print(output)
output = net_connect.send_command('show ip int brief')
print(output)
Download
0 formats
No download links available.
Python learning for Network Engineers Part 19 | Netmiko ssh and configure Cisco using text file | NatokHD