From 211bce5037f33dded4245adae8345bef890024e2 Mon Sep 17 00:00:00 2001 From: cycleke Date: Wed, 19 Jul 2023 19:08:35 +0800 Subject: [PATCH] ssh: apply HostKeyAlgorithms in ssh config --- wezterm-ssh/src/sessioninner.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wezterm-ssh/src/sessioninner.rs b/wezterm-ssh/src/sessioninner.rs index fe9dbd9f1..a0f30d646 100644 --- a/wezterm-ssh/src/sessioninner.rs +++ b/wezterm-ssh/src/sessioninner.rs @@ -201,6 +201,9 @@ impl SessionInner { if let Some(bind_addr) = self.config.get("bindaddress") { sess.set_option(libssh_rs::SshOption::BindAddress(bind_addr.to_string()))?; } + if let Some(host_key) = self.config.get("hostkeyalgorithms") { + sess.set_option(libssh_rs::SshOption::HostKeys(host_key.to_string()))?; + } let sock = self.connect_to_host(&hostname, port, verbose, self.config.get("proxycommand"))?;