-
Notifications
You must be signed in to change notification settings - Fork 557
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
IOSXR_NETCONF: Certain SSH arguments not supported #1394
Comments
FYI @neelimapp |
Also if anyone knows why these ssh args were even required, and if there's something I can do to not require them, I would be interested. |
@d-gagne allow_agent should probably default to False. The other two are better security i.e. you potentially shouldn't blindly trust SSH host keys. |
How do I explicitly trust the SSH host keys? |
You securely put the "known SSH hosts" in a file and you tell your SSH library that the hosts whose identities are specified in that file are trusted. |
I'm seeing this exact same message (authentication failure) when running from a script as well, I have noted the following, which may be a pointer to the base issue though, let me know if you need more info. This works --> ssh -p 830 -s [email protected] netconf The '-s' --> straight from the man page Above command error Error from the script mirrors the above error. Device ver: Build Information: cisco ASR9K () processor pip freeze | grep napalm |
@Tree2w63 Your message/issue sounds unrelated to NAPALM's IOS-XR driver? What is the relevance of your post here? |
Script fails at open optional_args = { driver = get_network_driver("iosxr_netconf") Here is the complete output from above ]# bin/test_iosxr_netconf.py During handling of the above exception, another exception occurred: Traceback (most recent call last): |
You have to specify port 830. it looks like you are trying to connect on port 22? Nevermind...it defaults to port 830 in the driver. |
Is the remote host in SSH known hosts? Does it work if you add: |
it was one of the optional args I tried, with no difference in the outcome |
optional_args won't work, you would have modify the code at the location that I pointed to (or add the relevant entry in SSH known-hosts). Actually, you might want to try the following three entries:
That would be interesting to know if it fixes your issue. Those items fixed the original issue that was reported by the original user. |
no difference with the below, but using the same via ncclient manager works from napalm import get_network_driver optional_args = { driver = get_network_driver("iosxr_netconf") |
optional_args won't work...they aren't wired in. You have to edit the python code (if you want to test them). You would have to edit them in here: |
Thank you, I'll add it to my local copy, going forward is this a patch that will be done, or will I need to document / highlight this, etc, so that when I update, I remember to update this as well. |
Just to confirm, that resolved it for me |
Okay, thanks for letting us know...we should make some fixes to the IOS-XR driver to change some of these defaults and to allow some of these to be passed via optional_args. |
I'm running into this as a blocker as well, are there any updates on passing optional arguments? Patching the underlying driver isn't a solution as we have multiple users running the code locally and it isn't feasible to patch on each environment |
@OsirisS13 Someone would need to implement a fix for this (so far no one has done it). It is probably pretty straight-forward to do. |
@ktbyers there's been no movement on the pull request I've submitted to resolve this issue. Is there something else I need to do to have it reviewed and merged? First time contributing to a project like this so I'm not sure of the process |
No, it is just me. Let me see if I can do this in the next week. |
IOSXR_NETCONF SSHException, optional args do not work
When connecting via iosxr_netconf I get an exception:
napalm.base.exceptions.ConnectionException: SSHException('No existing session')
I can get it to work by modifying iosxr_netconf.py to force it to use the optional args:
But iosxr_netconf doesn't use those optional args if you attempt to supply them using
--optional_args 'hostkey_verify=False, look_for_keys=False, allow_agent=False'
Also doesn't work if you use them via optional args in the driver init.
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an
x
between the square brackets where applicable)Setup
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network operating system version
(Paste verbatim output from
show version
- or equivalent - between quotes below)Steps to Reproduce the Issue
napalm --vendor iosxr_netconf --user $user --password $pw $host call get_facts
Error Traceback
(Paste the complete traceback of the exception between quotes below)
The text was updated successfully, but these errors were encountered: