ssh: apply HostKeyAlgorithms in ssh config

This commit is contained in:
cycleke authored and Wez Furlong committed 2023-08-06 10:40:44 -07:00
1 parent 3b4d82e74c
commit 211bce5037
1 file changed
+3
+3
View File
@@ -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"))?;