Can't connect to netopeer-server?

1,385 views
Skip to first unread message

Jing Zhao

unread,
Jul 30, 2014, 4:23:26 AM7/30/14
to neto...@googlegroups.com
Hi Radek,

I have been playing around w/ netopeer-server-sl for a few days. But as I try to switch to use netopeer-server today, I can't connect to the server.

netconf> connect 127.0.0.1
libnetconf WARNING: Unable to check against the knownhost file (/home/jzhao/.ssh/netconf_known_hosts).
The authenticity of the host '127.0.0.1' cannot be established.
RSA key fingerprint is 38:d7:cf:56:f5:ef:ad:b1:b8:4e:8c:05:62:26:33:56.
Are you sure you want to continue connecting (yes/no)? yes
libnetconf WARNING: Writing /home/jzhao/.ssh/netconf_known_hosts failed!
jz...@127.0.0.1 password:
libnetconf ERROR: Server has closed the communication socket
libnetconf ERROR: Malformed message received, closing the session .
connect: connecting to the 127.0.0.1 failed.
netconf>

Here is what I did before lanuching netopeer-cli:

1. Grab the latest code: (Please correct me if it's not the right place to get the latest code)

git clone https://code.google.com/p/netopeer


2. Change the corresponding line in SSH daemon configuration file (/etc/ssh/sshd_config) from "netopeer-server-sl" to "netopeer-server":
Subsystem netconf /home/jzhao/netopeer/server/netopeer-server

3. Restart SSH service:
$ sudo service SSH restart

Is this the right sequence to use the multi-level server? Is there anything I miss? I see there is another binary "netopeer-agent" in the "netopeer/server" folder. Do I need to manually invoke this binary before the client connection?

Radek Krejčí

unread,
Jul 30, 2014, 5:03:32 AM7/30/14
to Jing Zhao, neto...@googlegroups.com
Hi Jing,

Dne 30.7.2014 10:23, Jing Zhao napsal(a):
Hi Radek,

I have been playing around w/ netopeer-server-sl for a few days. But as I try to switch to use netopeer-server today, I can't connect to the server.

netconf> connect 127.0.0.1
libnetconf WARNING: Unable to check against the knownhost file (/home/jzhao/.ssh/netconf_known_hosts).
The authenticity of the host '127.0.0.1' cannot be established.
RSA key fingerprint is 38:d7:cf:56:f5:ef:ad:b1:b8:4e:8c:05:62:26:33:56.
Are you sure you want to continue connecting (yes/no)? yes
libnetconf WARNING: Writing /home/jzhao/.ssh/netconf_known_hosts failed!
jz...@127.0.0.1 password:
libnetconf ERROR: Server has closed the communication socket
libnetconf ERROR: Malformed message received, closing the session .
connect: connecting to the 127.0.0.1 failed.
netconf>

Here is what I did before lanuching netopeer-cli:

1. Grab the latest code: (Please correct me if it's not the right place to get the latest code)

git clone https://code.google.com/p/netopeer



this is the right place


2. Change the corresponding line in SSH daemon configuration file (/etc/ssh/sshd_config) from "netopeer-server-sl" to "netopeer-server":
Subsystem netconf /home/jzhao/netopeer/server/netopeer-server


no, just remove the netconf subsystem line from the /etc/ssh/sshd_config and the line allowing your standard sshd to listen on port 830. netopeer-server starts separated sshd with its own configuration. please see https://code.google.com/p/netopeer/wiki/MultiLevelServer#Installation

Also note, that in case of netopeer-server, the netopeer-server runs as a system daemon, so you have to start it before connecting. SSH daemon then starts netopeer-agent as its Subsystem - see http://libnetconf.googlecode.com/git/doc/doxygen/html/da/db3/server.html


3. Restart SSH service:
$ sudo service SSH restart


yes, this step is correct, after changing sshd_config, you are supposed to restart sshd


Is this the right sequence to use the multi-level server? Is there anything I miss? I see there is another binary "netopeer-agent" in the "netopeer/server" folder. Do I need to manually invoke this binary before the client connection?

complete How to document for the netopeer-server can be found at https://code.google.com/p/netopeer/wiki/MultiLevelServer or in the README file located in the server/ directory inside the Netopeer repository

Best regards,
Radek

Jing Zhao

unread,
Jul 30, 2014, 11:37:55 PM7/30/14
to neto...@googlegroups.com, yingm...@gmail.com
Hi Radek,

I can successfully connect the multi-level server after removing "Port 830" and netopeer-server from sshd_config file with a non-root session.

The only problem is that if I connect to the server with a root session, it fails with the following message. Not sure if others have seen this before?

netconf> connect 127.0.0.1 --login root

libnetconf WARNING: Unable to check against the knownhost file (/home/jzhao/.ssh/netconf_known_hosts).
The authenticity of the host '127.0.0.1' cannot be established.
RSA key fingerprint is 38:d7:cf:56:f5:ef:ad:b1:b8:4e:8c:05:62:26:33:56.
Are you sure you want to continue connecting (yes/no)? yes
libnetconf WARNING: Writing /home/jzhao/.ssh/netconf_known_hosts failed!
ro...@127.0.0.1 password:
libnetconf ERROR: Authentication failed (Authentication failed (username/password))
libnetconf ERROR: Unable to authenticate to the remote server (supported authentication method(s) are disabled).

connect: connecting to the 127.0.0.1 failed.
netconf>


By the way, when I ./configure the server, it says that "ubuntu is not fully supported". What does that mean? What impact will it be (or is there any feature that's not available on Ubuntu) ? Thanks.

root@ubuntu:/home/jzhao/netopeer/server# ./configure
checking for pkg-config... /usr/bin/pkg-config
checking for roff2html... no
checking for sshd... /usr/sbin/sshd
checking for distro... ubuntu
configure: WARNING: Unsupported Linux distro "ubuntu", only RHEL and SUSE are fully supported.

Radek Krejčí

unread,
Jul 31, 2014, 2:50:31 AM7/31/14
to Jing Zhao, neto...@googlegroups.com
Hi Jing,

Dne 31.7.2014 05:37, Jing Zhao napsal(a):
Hi Radek,

I can successfully connect the multi-level server after removing "Port 830" and netopeer-server from sshd_config file with a non-root session.


great


The only problem is that if I connect to the server with a root session, it fails with the following message. Not sure if others have seen this before?

netconf> connect 127.0.0.1 --login root
libnetconf WARNING: Unable to check against the knownhost file (/home/jzhao/.ssh/netconf_known_hosts).
The authenticity of the host '127.0.0.1' cannot be established.
RSA key fingerprint is 38:d7:cf:56:f5:ef:ad:b1:b8:4e:8c:05:62:26:33:56.
Are you sure you want to continue connecting (yes/no)? yes
libnetconf WARNING: Writing /home/jzhao/.ssh/netconf_known_hosts failed!
ro...@127.0.0.1 password:
libnetconf ERROR: Authentication failed (Authentication failed (username/password))
libnetconf ERROR: Unable to authenticate to the remote server (supported authentication method(s) are disabled).
connect: connecting to the 127.0.0.1 failed.
netconf>


It seems, that root login via SSH is not allowed. During the install process, netopeer-server copies your /etc/ssh/sshd_config to ${sysconfdir}/netopeer/sshd_config which serves as a template for ${sysconfdir}/netopeer/sshd_config.running used by Netopeer's sshd. Please check and modify that template configuration for PermitRootLogin setting or generally check your PAM settings. Try to login using ssh:

$ ssh ro...@127.0.0.1 -p 830



By the way, when I ./configure the server, it says that "ubuntu is not fully supported". What does that mean? What impact will it be (or is there any feature that's not available on Ubuntu) ? Thanks.

root@ubuntu:/home/jzhao/netopeer/server# ./configure
checking for pkg-config... /usr/bin/pkg-config
checking for roff2html... no
checking for sshd... /usr/sbin/sshd
checking for distro... ubuntu
configure: WARNING: Unsupported Linux distro "ubuntu", only RHEL and SUSE are fully supported.


We develop on SUSE and test on RHEL based distros. This just says, that we don't (regularly) test on Debian based (ubuntu) distros so there can be some issues not described in documentation or some other problems. However, we welcome any feedback or bugreports even from ubuntu. All features should be available :)

Regards,
Radek

--
You received this message because you are subscribed to the Google Groups "Netopeer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netopeer+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/netopeer.
For more options, visit https://groups.google.com/d/optout.

-- 
Radek Krejci
mobile  : +420 732 212 714
office  : +420 234 680 256
e-mail  : rkr...@cesnet.cz
LinkedIn: http://www.linkedin.com/in/radekkrejci

CESNET
Association of Legal Entities
160 00 Praha 6, Zikova 4
Czech Republic
Reply all
Reply to author
Forward
0 new messages