From e3ad7c25673e9c59e750612c83adf73fdb1576a4 Mon Sep 17 00:00:00 2001 From: Peter Suna Date: Tue, 24 Jan 2023 13:18:07 +0100 Subject: [PATCH] Reuse NetconfClientBuilder in NetconfCallHomeServer To prevent issues with connecting to devices that use old key exchange algorithms, use the default NetconfSshClient inside the NetconfCallHomeServer. JIRA: NETCONF-887 Change-Id: I379c26281dcec6df10dcdbe0ccbfa8c3bea7e8f0 Signed-off-by: Peter Suna --- .../callhome/protocol/NetconfCallHomeServerBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netconf/callhome-protocol/src/main/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerBuilder.java b/netconf/callhome-protocol/src/main/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerBuilder.java index 2b14b76302..136adf351a 100644 --- a/netconf/callhome-protocol/src/main/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerBuilder.java +++ b/netconf/callhome-protocol/src/main/java/org/opendaylight/netconf/callhome/protocol/NetconfCallHomeServerBuilder.java @@ -15,6 +15,7 @@ import java.util.Optional; import java.util.concurrent.TimeUnit; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.netconf.client.NetconfClientSessionNegotiatorFactory; +import org.opendaylight.netconf.nettyutil.handler.ssh.client.NetconfClientBuilder; import org.opendaylight.netconf.shaded.sshd.client.SshClient; public class NetconfCallHomeServerBuilder { @@ -104,7 +105,7 @@ public class NetconfCallHomeServerBuilder { } private static SshClient defaultSshClient() { - return SshClient.setUpDefaultClient(); + return new NetconfClientBuilder().build(); } private static NetconfClientSessionNegotiatorFactory defaultNegotiationFactory() { -- 2.36.6