diff --git a/docs/ssh.md b/docs/ssh.md index 32800b7b0..31cad3312 100644 --- a/docs/ssh.md +++ b/docs/ssh.md @@ -41,6 +41,7 @@ and respects the following options: * `Host` (including wildcard matching) * `UserKnownHostsFile` * `IdentitiesOnly` +* `BindAddress` All other options are parsed but have no effect. Notably, neither `Match` or `Include` will do anything. diff --git a/wezterm-ssh/src/sessioninner.rs b/wezterm-ssh/src/sessioninner.rs index d9cc6bb1e..1de1c5df0 100644 --- a/wezterm-ssh/src/sessioninner.rs +++ b/wezterm-ssh/src/sessioninner.rs @@ -196,6 +196,9 @@ impl SessionInner { types.to_string(), ))?; } + if let Some(bind_addr) = self.config.get("bindaddress") { + sess.set_option(libssh_rs::SshOption::BindAddress(bind_addr.to_string()))?; + } sess.connect()?;