11-05-2019 05:46 AM - edited 11-05-2019 05:49 AM
Hello,
I am getting "401 authentication needed" on below curl call
curl -i -k -X "GET" "https://192.168.1.34/restconf/data/Cisco-IOS-XE-native:native/version" -H 'Accept: application/yang-data+json' -u 'admin:admin'
Using the solution given in the below link, can able to hit the API and get response.
https://community.cisco.com/t5/network-management/restconf-401-authentication-needed/td-p/3348070
The change I made: no aaa new-model
Now the problem is I cannot access the switch using ssh protocol.
ssh root@192.168.1.34
root@192.168.1.34's password:
Permission denied, please try again.
root@192.168.1.34's password:
Authentication failed.
Telnet access works fine:
telnet192.168.1.34
Trying192.168.1.34...
Connected to192.168.1.34.
Escape character is '^]'.
User Access Verification
Password:
Switch>
To make the ssh access works again, I have to config aaa new-model which in turn gives 401 Authentication needed response for RESTCONF API calls.
How to allow both ssh and RESTCONF API calls without affecting one another?
I am new to networking, please let me know if I have to share more info to troubleshoot.
Thanks.
Mohan
08-12-2020 07:18 AM
leave aaa as it is to allow ssh and specify ip http authentication local, and provide create a priviledge level 15 user/pass
09-14-2020 10:35 AM
The problem can be the transport we are trying with RESTCONF.
RESTCONF uses HTTPS as transport. NETCONF uses SSH.
Slide 30.
https://www.ciscolive.com/c/dam/r/ciscolive/emea/docs/2018/pdf/LTRCRT-2700.pdf
09-06-2021 12:15 PM
The problem can be the transport we are trying with RESTCONF.
RESTCONF uses HTTPS as transport. NETCONF uses SSH.
Slide 30.
https://www.ciscolive.com/c/dam/r/ciscolive/emea/docs/2018/pdf/LTRCRT-2700.pdf
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide