From 2181ccc1e9cc735475b61cdb28eae9a6c252e49c Mon Sep 17 00:00:00 2001 From: Roman Janota Date: Fri, 17 Apr 2026 23:12:41 +0200 Subject: [PATCH 1/3] scripts UPDATE dont set "ssh banner" This "banner" was actually a protocol string that should be set via a libnetconf2 API. --- scripts/merge_config.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/merge_config.sh b/scripts/merge_config.sh index 78c52d28..a049be0b 100755 --- a/scripts/merge_config.sh +++ b/scripts/merge_config.sh @@ -68,13 +68,6 @@ if [ -n "$AUTH_CONFIG" ]; then " 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="netopeer2-netconf-server-${NP2_VERSION}" -fi - # import default config CONFIG=" @@ -89,7 +82,6 @@ CONFIG=" - ${SSH_BANNER} default-key From e2d1a9f81aa43fb933b99c4cd78754924a9b513b Mon Sep 17 00:00:00 2001 From: Roman Janota Date: Fri, 17 Apr 2026 23:14:36 +0200 Subject: [PATCH 2/3] main UPDATE set ssh protocol string --- CMakeLists.txt | 4 ++-- src/main.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4484f37e..098fb7ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,8 +49,8 @@ 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 diff --git a/src/main.c b/src/main.c index 3a76ed76..483c9262 100644 --- a/src/main.c +++ b/src/main.c @@ -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."); From 64ceba96638213242265b602e32ca96d604cba6b Mon Sep 17 00:00:00 2001 From: Roman Janota Date: Fri, 17 Apr 2026 23:15:16 +0200 Subject: [PATCH 3/3] VERSION bump to version 2.8.5 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 098fb7ea..65f00a99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ 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)