netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

Connecting remote netopeer2-client the connection is getting closed at local netconf session.

Open Abrahamma97 opened this issue 2 years ago • 6 comments

Hi @michalvasko, I am taking local netconf session and after which when I am using "connect --ssh --host 192.168.4.50 --port 830 --login root" from remote netopeer2-client the connection is getting closed as local netconf session.

root@localboard:~$ssh root@localhostip -p 830 -s netconf Interactive SSH Authentication Type your password: Password: urn:ietf:params:netconf:base:1.0urn:ietf:params:netconf:base:1.1urn:ietf:params:netconf:capability:writable-running:1.0urn:ietf:params:netconf:capability:candidate:1.0urn:ietf:params:netconf:capability:rollback-on-error:1.0urn:ietf:params:netconf:capability:validate:1.1urn:ietf:params:netconf:capability:startup:1.0urn:ietf:params:netconf:capability:xpath:1.0urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,expliciturn:ietf:params:netconf:capability:notification:1.0urn:ietf:params:netconf:capability:interleave:1.0urn:ietf:params:xml:ns:yang:ietf-yang-metadata?module=ietf-yang-metadata&revision=2016-08-05urn:ietf:params:xml:ns:yang:1?module=yang&revision=2017-02-20urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2013-07-15urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15urn:ietf:params:netconf:capability:yang-library:1.1?revision=2019-01-04&content-id=61urn:sysrepo:plugind?module=sysrepo-plugind&revision=2020-12-10urn:ietf:params:xml:ns:yang:ietf-netconf-acm?module=ietf-netconf-acm&revision=2018-02-14urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2013-09-29&features=writable-running,candidate,rollback-on-error,validate,startup,url,xpathurn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2011-06-01urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2012-02-06urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2014-12-10urn:ietf:params:xml:ns:yang:iana-crypt-hash?module=iana-crypt-hash&revision=2014-08-06urn:notification_history?module=notification_historyurn:ietf:params:xml:ns:yang:iana-if-type?module=iana-if-type&revision=2017-01-193]]>]]>Connection to 192.168.4.91 closed by remote host.

Can you please let me know the reason why this could be happening?

Abrahamma97 avatar Mar 31 '22 07:03 Abrahamma97

Look at the output of netopeer2-server. Most likely, it does not get the hello message it expects. It is a really bad idea to try to use ssh(1) for NETCONF connections, you need to use a proper NETCONF client such as netopeer2-cli.

michalvasko avatar Mar 31 '22 10:03 michalvasko

Hi @michalvasko , I am getting the below out [ERR]: LN: Client's <hello> timeout elapsed. May I know why it is a really bad idea to try to use ssh(1) for NETCONF connections.

Abrahamma97 avatar Mar 31 '22 12:03 Abrahamma97

Because in NETCONF, SSH is just the transport protocol, you communicate using the NETCONF protocol. Sending proper NETCONF messages using a shell that ssh provides is almost impossible.

michalvasko avatar Mar 31 '22 13:03 michalvasko

Hi @Abrahamma97,

Having same issue while connecting cli. Did you find a solution?

[ERR]: LN: Client's <hello> timeout elapsed.

marchest avatar Apr 14 '22 06:04 marchest

Hi @marchest , I second @michalvasko s opinion. Sending proper NETCONF messages using a shell that ssh provides is almost impossible. This should be the reason.

Abrahamma97 avatar May 11 '22 09:05 Abrahamma97

Hi @Abrahamma97 ,

Thanks

marchest avatar May 20 '22 10:05 marchest