Closed rydy closed 2 years ago
It is quite obvious from the output
[INF]: LN: Received an SSH message "request-auth" of subtype "interactive".
[INF]: LN: Failed user "root" authentication attempt (#1).
[INF]: LN: Received an SSH message "request-auth" of subtype "password".
[INF]: LN: Failed user "root" authentication attempt (#2).
that you have failed both authentication kinds, you have used an incorrect password for the user.
I've tried many times, and I'm sure I didn't get the password wrong, Libssh is incompatible with OpenSSL.
Not sure I understand, you were using some incompatible OpenSSL version? Because it is a necessary dependency of libssh.
Not sure I understand, you were using some incompatible OpenSSL version? Because it is a necessary dependency of libssh.
yes, By the way, Do you plan to support SSHV2 in the future?
I see, could you please mention the version? For other users that may encounter the same problem. Also, do you know what the incompatibility exactly was?
What do you mean by SSHv2
? If you mean libssh2
then no because it includes only SSH client API, we need server as well.
I see, could you please mention the version? For other users that may encounter the same problem. Also, do you know what the incompatibility exactly was?
This is caused by a discrepancy between the openSSL I compiled and the openSSL I used at runtime.
What do you mean by
SSHv2
? If you meanlibssh2
then no because it includes only SSH client API, we need server as well.
I made a mistake, libssh already supports SSHv2, I have one more question, Does libnetconf2 use SSHv1 by default? How do I use SSHv2?
This is caused by a discrepancy between the openSSL I compiled and the openSSL I used at runtime.
I see, probably not relevant for other user.
Does libnetconf2 use SSHv1 by default? How do I use SSHv2?
It is up to libssh, which I believe has SSHv1 disabled altogether by default for quite some time now. Why do you think you are not using SSHv2?
This is caused by a discrepancy between the openSSL I compiled and the openSSL I used at runtime.
I see, probably not relevant for other user.
Does libnetconf2 use SSHv1 by default? How do I use SSHv2?
It is up to libssh, which I believe has SSHv1 disabled altogether by default for quite some time now. Why do you think you are not using SSHv2?
I see(https://www.libssh.org/?s=sshv), Thanks.
version: libssh 0.9.5 openssh1.1.1j
What I just said was not correct, The first time I entered an empty password the connection succeeded, Repeated attempts to enter the correct password failed to connect. I've tried many times, and I'm sure I didn't get the password wrong.
root@OpenWrt:~# netopeer2-cli
> connect
Interactive SSH Authentication
Type your password:
Password:
> status
Current NETCONF session:
ID : 1
Host : 127.0.0.1
Port : 830
Transport : SSH
Capabilities:
urn:ietf:params:netconf:base:1.0
urn:ietf:params:netconf:base:1.1
urn:ietf:params:netconf:capability:writable-running:1.0
urn:ietf:params:netconf:capability:candidate:1.0
urn:ietf:params:netconf:capability:confirmed-commit:1.1
urn:ietf:params:netconf:capability:rollback-on-error:1.0
urn:ietf:params:netconf:capability:validate:1.1
urn:ietf:params:netconf:capability:startup:1.0
urn:ietf:params:netconf:capability:xpath:1.0
urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,explicit
urn:ietf:params:netconf:capability:notification:1.0
urn:ietf:params:netconf:capability:interleave:1.0
urn:ietf:params:xml:ns:yang:ietf-yang-metadata?module=ietf-yang-metadata&revision=2016-08-05
urn:ietf:params:xml:ns:yang:1?module=yang&revision=2021-04-07
urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2013-07-15
urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15
urn:ietf:params:netconf:capability:yang-library:1.1?revision=2019-01-04&content-id=80
urn:sysrepo:plugind?module=sysrepo-plugind&revision=2020-12-10
urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2013-09-29&features=writable-running,candidate,confirmed-commit,rollback-on-error,validate,startup,url,xpath
urn:ietf:params:xml:ns:yang:ietf-netconf-acm?module=ietf-netconf-acm&revision=2018-02-14
urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2011-06-01
urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2012-02-06
urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04
urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14
urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14
urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2014-12-10
urn:ietf:params:xml:ns:yang:iana-crypt-hash?module=iana-crypt-hash&revision=2014-08-06
urn:ietf:params:xml:ns:yang:iana-if-type?module=iana-if-type&revision=2017-01-19
> disconnect
> connect
Interactive SSH Authentication
Type your password:
Password:
root@localhost password:
nc ERROR: Unable to authenticate to the remote server (all attempts via supported authentication methods failed).
cmd_connect: Connecting to the localhost:830 as user "root" failed.
> exit
root@OpenWrt:~#
root@OpenWrt:~# tail -f /O-RAN/log/netopeer2-server.log
[INF]: SR: Triggering "ietf-netconf-server" "done" event on enabled data.
[INF]: SR: Triggering "ietf-keystore" "done" event on enabled data.
[INF]: SR: Triggering "ietf-truststore" "done" event on enabled data.
[INF]: SR: Triggering "ietf-netconf-acm" "done" event on enabled data.
[INF]: SR: Triggering "ietf-netconf-acm" "done" event on enabled data.
[INF]: SR: Triggering "ietf-netconf-acm" "done" event on enabled data.
[INF]: SR: Triggering "ietf-netconf-acm" "done" event on enabled data.
[WRN]: SR: Recovering module "ietf-netconf-acm" operational subscription of CID 171.
[WRN]: SR: Recovering module "ietf-netconf-acm" operational subscription of CID 171.
[WRN]: SR: Recovering module "ietf-netconf-acm" operational subscription of CID 171.
[INF]: LN: Accepted a connection on 0.0.0.0:830 from 127.0.0.1:55310.
[INF]: SR: Session 61 (user "root", CID 178) created.
[INF]: LN: Received an SSH message "request-service" of subtype "ssh-userauth".
[INF]: LN: Received an SSH message "request-auth" of subtype "none".
[INF]: LN: Received an SSH message "request-auth" of subtype "interactive".
[INF]: LN: Received an SSH message "request-auth" of subtype "interactive".
[WRN]: LN: User authentication successful with an empty password!
[INF]: LN: User "root" authenticated.
[INF]: LN: Received an SSH message "request-channel-open" of subtype "session".
[INF]: LN: Received an SSH message "request-channel" of subtype "subsystem".
[INF]: SR: Session 62 (user "root", CID 178) created.
[INF]: SR: There are no subscribers for "ietf-netconf-notifications" notifications.
[INF]: NP: Generated new event (netconf-session-start).
[INF]: LN: Session 1: Schema "ietf-netconf@2013-09-29" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-inet-types@2013-07-15" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-netconf-acm@2018-02-14" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-types@2013-07-15" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-metadata@2016-08-05" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-types@2013-07-15" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-library@2019-01-04" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-types@2013-07-15" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-inet-types@2013-07-15" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-datastores@<any>" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-datastores@<any>" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-netconf-nmda@<any>" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-types@2013-07-15" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-inet-types@2013-07-15" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-origin@<any>" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-metadata@2016-08-05" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-netconf-with-defaults@2011-06-01" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-metadata@2016-08-05" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: SR: Published event "rpc" "/ietf-netconf-nmda:get-data" with ID 1 priority 0 for 1 subscribers.
[INF]: SR: Processing "/ietf-netconf-nmda:get-data" "rpc" event with ID 1 priority 0 (remaining 1 subscribers).
[INF]: SR: Successful processing of "rpc" event with ID 1 priority 0 (remaining 0 subscribers).
[INF]: SR: Event "rpc" with ID 1 priority 0 succeeded.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "sysrepo@2021-09-07" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "sysrepo-monitoring@2021-07-29" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "sysrepo-plugind@2020-12-10" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-netconf-notifications@2012-02-06" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "nc-notifications@2008-07-14" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "notifications@2008-07-14" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-x509-cert-to-name@2014-12-10" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "ietf-crypto-types@2019-07-02" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "ietf-keystore@2019-07-02" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-truststore@2019-07-02" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "ietf-tcp-common@2019-07-02" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-ssh-server@2019-07-02" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-ssh-common@2019-07-02" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "iana-crypt-hash@2014-08-06" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "ietf-tls-server@2019-07-02" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-tls-common@2019-07-02" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "ietf-netconf-server@2019-07-02" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "ietf-tcp-client@2019-07-02" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-tcp-server@2019-07-02" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "ietf-interfaces@2018-02-20" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-ip@2018-02-22" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-network-instance@2019-01-21" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-schema-mount@2019-01-14" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-subscribed-notifications@2019-09-09" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "ietf-restconf@2017-01-26" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-push@2019-09-09" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "ietf-restconf@2017-01-26" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-yang-patch@2017-02-22" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "ietf-restconf@2017-01-26" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "ietf-dhcpv6-types@2018-09-04" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "iana-hardware@2018-03-13" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "ietf-hardware@2018-03-13" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "iana-if-type@2017-01-19" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-wg4-features@2020-12-10" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-dhcp@2020-12-10" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-supervision@2020-12-10" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-hardware@2020-12-10" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-interfaces@2020-12-10" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-file-management@2019-07-03" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-software-management@2019-07-03" was requested.
[INF]: NP: Session 1: thread 1 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-trace@2019-07-03" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-troubleshooting@2019-02-04" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-fm@2019-02-04" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-ald-port@2019-07-03" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-ald@2019-07-03" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-antenna-calibration@2020-12-10" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-sync@2020-08-10" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-compression-factors@2020-08-10" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-module-cap@2020-12-10" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-processing-element@2020-04-17" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-delay-management@2020-08-10" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-ecpri-delay@2019-02-04" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-ethernet-forwarding@2020-04-17" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-externalio@2019-07-03" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-fan@2019-07-03" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-laa@2019-07-03" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-laa-operations@2019-07-03" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-lbm@2019-02-04" was requested.
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-mplane-int@2019-07-03" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-performance-management@2020-12-10" was requested.
[INF]: NP: Session 1: thread 2 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-shared-cell@2020-12-10" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-transceiver@2019-07-03" was requested.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: LN: Session 1: Schema "o-ran-udp-echo@2019-02-04" was requested.
[INF]: NP: Session 1: thread 4 event new RPC.
[INF]: NP: Session 1: thread 3 event new RPC.
[INF]: NP: Session 1: thread 3 event session terminated.
[INF]: SR: There are no subscribers for "ietf-netconf-notifications" notifications.
[INF]: NP: Generated new event (netconf-session-end).
[2015/08/02 11:24:56.665383, 1] ssh_socket_exception_callback: Socket exception callback: 1 (0)
[2015/08/02 11:24:56.665429, 1] ssh_socket_exception_callback: Socket error: disconnected
[INF]: LN: Accepted a connection on 0.0.0.0:830 from 127.0.0.1:55312.
[INF]: SR: Session 70 (user "root", CID 178) created.
[INF]: LN: Received an SSH message "request-service" of subtype "ssh-userauth".
[INF]: LN: Received an SSH message "request-auth" of subtype "none".
[INF]: LN: Received an SSH message "request-auth" of subtype "interactive".
[INF]: LN: Received an SSH message "request-auth" of subtype "interactive".
[INF]: LN: Failed user "root" authentication attempt (#1).
[INF]: LN: Received an SSH message "request-auth" of subtype "password".
[INF]: LN: Failed user "root" authentication attempt (#2).
[2015/08/02 11:25:05.729662, 1] ssh_packet_disconnect_callback: Received SSH_MSG_DISCONNECT: 11:Bye Bye
[ERR]: LN: Communication SSH socket unexpectedly closed.
That is really strange and as expected, I could not reproduce it locally. It will be something specific to OpenWRT but I do not have access to that platform so I am not sure how I can help you. You could try experimenting with it more (login as another user with empty password, try to set password for root
and try it then, ...) but best would be to look at what is ahppening in libnetconf2 during that authentication. You can do that with gdb
or I could be able to provide patch with some messages that could show what the problem is.
Hi, version: netopeer2-server 2.0.35 libssh 0.9.5 I tried to use the CLI, and the following exception occurred.