import re from netmiko import ConnectHandler ips = [ '10.32.5.130', '10.32.5.131', '10.32.5.132', '10.32.5.133', '10.32.5.134', '10.32.5.135', ] for ip in ips: hw_fw = {'device_type': 'huawei','host': ip, 'username': '493031','password': '密码','port': '22' } net_connect = ConnectHandler(**hw_fw) str_data = net_connect.send_command_timing('\rdisplay version\r') print(ip,str_data) print('==================================================')
ssh到huawei交换机
最新推荐文章于 2024-08-23 10:04:22 发布