cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1128
Views
1
Helpful
4
Replies

NC_get_config.py failing with Sandbox

tristanh
Level 1
Level 1

Beginner with NETCONF here, could just be missing something obvious. Could also be the sandbox isn't working correctly, but if someone can verify what I'm doing I'd appreciate ruling in or out my own work here. 

Attempting to do a little NETCONF sandbox demo, I keep getting:

"File "/opt/homebrew/lib/python3.11/site-packages/ncclient/manager.py", line 176, in connect
return connect_ssh(*args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/ncclient/manager.py", line 143, in connect_ssh
session.connect(*args, **kwds)
File "/opt/homebrew/lib/python3.11/site-packages/ncclient/transport/ssh.py", line 364, in connect
self._auth(username, password, key_filenames, allow_agent, look_for_keys)
File "/opt/homebrew/lib/python3.11/site-packages/ncclient/transport/ssh.py", line 480, in _auth
raise AuthenticationError(repr(saved_exception))
ncclient.transport.errors.AuthenticationError: AuthenticationException('Authentication failed.')"

The script I'm using is: https://github.com/CiscoDevNet/python_code_samples_network/blob/master/NC-get-config/NC-get-config.py

The command I'm using is: python3 NC_get_config.py --host sandbox-iosxe-recomm-1.cisco.com -u developer -p C1sco12345 --port 830

Details of the host:

CSR1000V Host: sandbox-iosxe-recomm-1.cisco.com
SSH Port: 22
NETCONF Port: 830
RESTCONF Ports: 443 (HTTPS)
Username: developer
Password: C1sco12345

1 Accepted Solution

Accepted Solutions

@tristanh its failing as your username/password is not correct (AuthenticationError:) is you use the same details ssh to the device will also fail. I think work was being done and password etc.. are being updated. Reserve this one HERE and try the code.

Hope this helps.

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

4 Replies 4

@tristanh its failing as your username/password is not correct (AuthenticationError:) is you use the same details ssh to the device will also fail. I think work was being done and password etc.. are being updated. Reserve this one HERE and try the code.

Hope this helps.

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thanks yeah, that's what I thought it was, I appreciate the second set of eyes!!

Sanito
Level 1
Level 1

anybody know if they fixed the username/password?

i'm using the following and still getting same error

  • CSR1000V Host: sandbox-iosxe-recomm-1.cisco.com
    • SSH Port: 22
    • NETCONF Port: 830
    • RESTCONF Ports: 443 (HTTPS)
  • Username: developer
  • Password: lastorangerestoreball8876

@Sanito the username and password are ok, but looks like the enable password has been removed or the developer username is no longer priv level 15

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io