From 0fad4e6307356bd95fe74d3798e80e55b0126276 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Wed, 30 Jul 2025 12:28:23 +0200 Subject: [PATCH] tests: Enable all key exchange methods in ssh_ping Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider (cherry picked from commit 771e19a7a99e28d016bde7d56f4704622aec5070) --- tests/ssh_ping.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/ssh_ping.c b/tests/ssh_ping.c index 01754590..ae2dfe39 100644 --- a/tests/ssh_ping.c +++ b/tests/ssh_ping.c @@ -27,6 +27,7 @@ int main(int argc, char **argv) const char *banner = NULL; ssh_session session = NULL; const char *hostkeys = NULL; + const char *kex = NULL; int rc = 1; bool process_config = false; @@ -67,6 +68,13 @@ int main(int argc, char **argv) goto out; } + /* Enable all supported kex algorithms */ + kex = ssh_kex_get_supported_method(SSH_KEX); + rc = ssh_options_set(session, SSH_OPTIONS_KEY_EXCHANGE, kex); + if (rc < 0) { + goto out; + } + rc = ssh_connect(session); if (rc != SSH_OK) { fprintf(stderr, "Connection failed : %s\n", ssh_get_error(session));