Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ endif()
# Generic version of not only the library. Major version is reserved for really big changes of the project,
# minor version changes with added functionality (new tool, functionality of the tool or library, ...) and
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(NP2SRV_VERSION 2.8.4)
set(NP2SRV_VERSION 2.8.5)

# libyang required version
set(LIBYANG_DEP_VERSION 5.1.3)
set(LIBYANG_DEP_SOVERSION 5.1.3)
set(LIBYANG_DEP_SOVERSION_MAJOR 5)

# libnetconf2 required version
set(LIBNETCONF2_DEP_VERSION 4.2.0)
set(LIBNETCONF2_DEP_SOVERSION 5.2.0)
set(LIBNETCONF2_DEP_VERSION 4.3.3)
set(LIBNETCONF2_DEP_SOVERSION 5.3.9)
set(LIBNETCONF2_DEP_SOVERSION_MAJOR 5)

# sysrepo required version
Expand Down
8 changes: 0 additions & 8 deletions scripts/merge_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ if [ -n "$AUTH_CONFIG" ]; then
</users>"
fi

SSH_BANNER=""
# check if the NP2_VERSION environment variable is set
if [ -n "$NP2_VERSION" ]; then
# get the banner from the NP2_VERSION environment variable
SSH_BANNER="<banner xmlns=\"urn:cesnet:libnetconf2-netconf-server\">netopeer2-netconf-server-${NP2_VERSION}</banner>"
fi

# import default config
CONFIG="<netconf-server xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-server\">
<listen>
Expand All @@ -89,7 +82,6 @@ CONFIG="<netconf-server xmlns=\"urn:ietf:params:xml:ns:yang:ietf-netconf-server\
</tcp-server-parameters>
<ssh-server-parameters>
<server-identity>
${SSH_BANNER}
<host-key>
<name>default-key</name>
<public-key>
Expand Down
6 changes: 6 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,12 @@ server_init(void)
/* if PAM is not supported, the function will return an error, but don't check it, because PAM is not required */
nc_server_ssh_set_pam_conf_filename("netopeer2.conf");

/* set SSH protocol string to send to clients */
if (nc_server_ssh_set_protocol_string("netopeer2_" NP2SRV_VERSION)) {
ERR("Setting SSH protocol string failed.");
goto error;
}

/* set authorized_keys path format to by default {client_home}/.ssh/authorized_keys */
if (nc_server_ssh_set_authkey_path_format(NP2SRV_SSH_AUTHORIZED_KEYS_FORMAT)) {
ERR("Setting authorized_keys path format failed.");
Expand Down
Loading