I installed libydk and related ietf/openconfig/cisco* packages for ydk-py. When I run the hello world app I get the below error. Any probable issues I can debug ? I am using a cisco switch on GNS3.
-ThinkCentre-M92p:$ python hello.py
Traceback (most recent call last):
File "hello.py", line 13, in <module>
provider = NetconfServiceProvider(address="10.138.77.124", port=830, username="test", password="test123", protocol="ssh")
RuntimeError: YCPPClientError: Could not connect to 10.138.77.124
I am using Cisco 7200 on GNS3 with IoS 15.2. I am assuming the default port used for Netconf is 830 since I couldnt find any config command to change the Netconf port. When I connect to netconf using the command "ssh -v -s email@example.com netconf" it works fine but returns connection refused error when I use "-p 830" option as part of the ssh command.
Anyway I can find the port number being used by Netconf on Cisco switch ?
Thanks for your response.
A Cisco 7200 only supports at best legacy Netconf (RFC 4741-compliant), but the YDK is for RFC6241+RFC6020-compliant devices only. For IOS, this means IOS-XE 16.3.1 or later.
Could you please be more specific and post your test environment, script and YDK log with enabled DEBUG level.
Were you able connect to the Netconf server from CLI? The command is:
$ ssh <uname>@<IP-address> -p 830 -v -s netconf
I also would suggest to open new discussian thread as YDK changed a lot since 2017 and some SSH issues have already been addressed.