Open tvphuocjp opened 10 months ago
Try setting fast_cli=False
as an argument to your device_info device dictionary.
device_info = {
"ip": router,
"port": 22,
"username": "******",
"password": "******",
"device_type": "fiberstore_fsos",
"fast_cli": False,
}
Dear Sir,
I 've tried to add fast_cli=False but it's not OK. I use netmiko 4.3.0
netmiko.exceptions.NetmikoAuthenticationException: Authentication to device failed.
Common causes of this problem are:
Device settings: fiberstore_fsos ....***:22
File "
netmiko.version '4.3.0'
Okay, how about:
device_info = {
"ip": router,
"port": 22,
"username": "******",
"password": "******",
"device_type": "fiberstore_fsos",
"fast_cli": False,
"global_delay_factor": 2, # Added
"default_enter": "\r", # Added
}
I try your suggestion, but it doesn't work. def get_ip_brief(router): device_info = {"ip": router, "port": 22, "username": "", "password": "", "device_type": "fiberstore_fsos", "fast_cli": False, "global_delay_factor": 2, "default_enter": "\r"} conn = netmiko.ConnectHandler(device_info, conn_timeout = 600) conn = netmiko.ConnectHandler(device_info, conn_timeout = 600) print(f"Connect to {list_router[router]} successfully") prompt = conn.find_prompt() x = datetime.datetime.now() year = (x.strftime("%Y")) month = (x.strftime("%m")) day = (x.strftime("%d")) print(prompt) cmd1 = f"ping 8.8.8.8 source {router} ntimes 10\n" output1 = conn.send_command(f"ping 8.8.8.8 source {router} ntimes 10", expect_string= prompt, read_timeout=300)
cmd2 = f"traceroute 8.8.8.8 source {router}\n"
output2 = conn.send_command(f"traceroute 8.8.8.8 source {router}", expect_string= prompt, read_timeout=300)
#print(output2.split("\n"))
conn.disconnect()
Output
netmiko.exceptions.NetmikoAuthenticationException: Authentication to device failed.
Common causes of this problem are:
Device settings: fiberstore_fsos ....***:22
Bad authentication type; allowed types: ['publickey', 'password'] ubuntu22:~/pingtracert#
Hi @ktbyers ,
What should I do next? Please give me some advices.
Hello @ktbyers any news ? :)
Description of Issue/Question
Netmiko device_type (if relevant to the issue)
(Paste
device_type
between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
Relevant Python code
(Please try to essentialize your Python code to the minimum code needed to reproduce the issue) (Paste the code between the quotes below)