New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HUAWEI VRP (R) software does not support diffie-hellman-group16-sha512 #2443
Comments
@yufengshizhe Does that work? https://github.com/ktbyers/netmiko/blob/develop/netmiko/ssh_dispatcher.py#L192 Otherwise, you would probably need to create a driver for the platform (if you want support for it). Process for creating a driver is here: |
Use VRP8 is still the same, NetmikoTimeoutException |
What is the actual exception / issue that you run into? |
user netmiko to login huawei switch timeout |
I would need to see a simplified version of the code (i.e. a simple base case that illustrates the problem) and the full exception stack trace. Regards, Kirk |
import os
import netmiko
from netmiko import ConnectHandler,NetmikoTimeoutException,NetmikoAuthenticationException #引入netmiko连接模块、报错模块
import getpass
import time
date = time.strftime('%Y%m%d', time.localtime()) #赋予date变量
swlist=open("ip.txt","r",encoding='utf8')
for ip in swlist.readlines():
huawei = {
'device_type':"huawei", #定义设备类型
'ip':ip,
'port':'22',
'username':'xxxxxx',
'password':'xxxxxxx',
#'secret' : 'admin' #enable密码
}
try:
huawei_connect = ConnectHandler(**huawei) #传入设备字典与设备建立SSH连接。
print ("Sucessfully Login to",ip)
print ("Building configuration...")
cmd1=("dis ver")
out1=huawei_connect.send_command(cmd1)
print(out1)
print(ip,'Was finished!\n',"-"*100)
except NetmikoAuthenticationException : #认证失败报错记录
e1 = open(f'{date}.txt','a')
print(date,ip,'[Error 1] Authentication failed.\n',file = e1)
e1.close
except NetmikoTimeoutException : #登录超时报错记录
e2 = open(f'{date}.txt','a')
print(date,ip,'[Error 2] Connection timed out.\n',file = e2)
e2.close
except : #未知报错记录
e3 = open(f'{date}.txt','a')
print(date,ip,'[Error 3] Unknown error.\n',file = e3)
e3.close
huawei_connect.disconnect() #断开SSH连接
swlist.close() |
hi, |
netmiko not support HUAWEI VRP (R) software, Version 5.170 (S5720 V200R019C10SPC500)
The text was updated successfully, but these errors were encountered: