ssh到huawei交换机

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交换机_第1张图片

你可能感兴趣的:(服务器,网络,运维)