试图弄清楚如何在 netmiko 中使用套接字源。到目前为止没有运气......(
from netmiko import ConnectHandler
import socket
cisco_881 =
{
'device_type': 'cisco_ios',
'host': '192.168.2.241',
'username': 'admin',
'password': 'admin',
'secret': 'admin',
}
net_connect = ConnectHandler(**cisco_881)
output = net_connect.send_command('show interface')
print(output)