server ssh UPDATE print more informative err msg
diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c
index c6b744d..34db658 100644
--- a/src/session_server_ssh.c
+++ b/src/session_server_ssh.c
@@ -1859,6 +1859,7 @@
struct nc_server_ssh_opts *opts;
int rc = 1, r;
struct timespec ts_timeout;
+ const char *err_msg;
opts = session->data;
@@ -1909,7 +1910,11 @@
rc = 0;
goto cleanup;
} else if (r != SSH_OK) {
- ERR(session, "SSH key exchange error (%s).", ssh_get_error(session->ti.libssh.session));
+ err_msg = ssh_get_error(session->ti.libssh.session);
+ if (err_msg[0] == '\0') {
+ err_msg = "hostkey algorithm generated from the hostkey most likely not found in the set of configured hostkey algorithms";
+ }
+ ERR(session, "SSH key exchange error (%s).", err_msg);
rc = -1;
goto cleanup;
}