Error connecting to remote host with message "Failed to authenticate: Authentication failed." and code line "raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)" #937
Labels
needs_info
This issue requires further information. Please answer any outstanding questions.
SUMMARY
I am trying to launch a command into a remote ios device using ios_command module (the same problem with ios_facts). With the proper configuration vars is trigering the error indicated in the tittle. See below the piece of code to reproduce it and also the explanation of what I think the problem is.
ISSUE TYPE
COMPONENT NAME
ios_command and ios_facts modules
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
REMOTE HOST CISCO VERSION:
Cisco IOS XE Software, Version 16.09.04
STEPS TO REPRODUCE
It's simple I just try to execute command 'show run' in the remote cisco host. Here the simple peace of code.
EXPECTED RESULTS
I expect ansible to use libssh python package to connect to the remote host and not get any error in the log in process.
ACTUAL RESULTS
It gets an authenticating error when loging in. See the whole error below:
SOLUTION THAT I FOUND AND EXPLANATION
I established the ansible_network_cli_ssh_type to "libssh" so I just needed to add it in the vars section. This var made it work but why? It is curious that in the documentation that describes this variable says that "auto" is the default behavior and "auto will use ansible-pylibssh if that package is installed, otherwise will fallback to paramiko.". So It is supposed to use libssh package as default behavior so It shouldn't fail and It wouldn't be necessary to established like that this var.
I tryed to deeg more and I did another test establishing the var like 'ansible_network_cli_ssh_type: "paramiko"' and failed in the exactly the some way as above. With this information I have two option happening here:
The second option is more likely for me, What do you think???
The text was updated successfully, but these errors were encountered: