1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00

ssh: use only the first known host location for libssh

This commit is contained in:
Wez Furlong 2021-10-19 09:39:22 -07:00
parent 8be442e39b
commit 199fd6f52f

View File

@ -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?