From 199fd6f52fa612aef0bf962a1436a7aa7b81b15b Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 19 Oct 2021 09:39:22 -0700 Subject: [PATCH] ssh: use only the first known host location for libssh --- wezterm-ssh/src/sessioninner.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wezterm-ssh/src/sessioninner.rs b/wezterm-ssh/src/sessioninner.rs index aa448d278..be79d34a6 100644 --- a/wezterm-ssh/src/sessioninner.rs +++ b/wezterm-ssh/src/sessioninner.rs @@ -120,7 +120,10 @@ impl SessionInner { } } if let Some(kh) = self.config.get("userknownhostsfile") { - sess.set_option(libssh::SshOption::KnownHosts(Some(kh.to_string())))?; + for file in kh.split_whitespace() { + sess.set_option(libssh::SshOption::KnownHosts(Some(file.to_string())))?; + break; + } } sess.options_parse_config(None)?; // FIXME: overridden config path?