diff --git a/wezterm-ssh/src/pty.rs b/wezterm-ssh/src/pty.rs index 4a0a0a527..490a5f87f 100644 --- a/wezterm-ssh/src/pty.rs +++ b/wezterm-ssh/src/pty.rs @@ -191,7 +191,13 @@ impl crate::session::SessionInner { // Depending on the server configuration, a given // setenv request may not succeed, but that doesn't // prevent the connection from being set up. - log::warn!("ssh: setenv {}={} failed: {}", key, val, err); + log::warn!( + "ssh: setenv {}={} failed: {}. \ + Check the AcceptEnv setting on the ssh server side.", + key, + val, + err + ); } } } diff --git a/wezterm-ssh/src/session/mod.rs b/wezterm-ssh/src/session/mod.rs index 02e90971d..853dcc389 100644 --- a/wezterm-ssh/src/session/mod.rs +++ b/wezterm-ssh/src/session/mod.rs @@ -406,6 +406,13 @@ impl SessionInner { .ok_or_else(|| anyhow!("port is always set in config loader"))? .parse::()?; + self.tx_event + .try_send(SessionEvent::Banner(Some(format!( + "Using libssh-rs to connect to {}@{}:{}", + user, hostname, port + )))) + .context("notifying user of banner")?; + let sess = libssh::Session::new()?; // sess.set_option(libssh::SshOption::LogLevel(libssh::LogLevel::Packet))?; sess.set_option(libssh::SshOption::Hostname(hostname.clone()))?; @@ -455,6 +462,13 @@ impl SessionInner { .parse::()?; let remote_address = format!("{}:{}", hostname, port); + self.tx_event + .try_send(SessionEvent::Banner(Some(format!( + "Using ssh2 to connect to {}@{}:{}", + user, hostname, port + )))) + .context("notifying user of banner")?; + let tcp: TcpStream = if let Some(proxy_command) = self.config.get("proxycommand").and_then(|c| { if !c.is_empty() && c != "none" { @@ -658,7 +672,11 @@ impl SessionInner { ); out.fd.take(); } else { - log::trace!("Failed to read data from channel: {:#}, but still have some buffer to drain", err); + log::trace!( + "Failed to read data from channel: {:#}, but \ + still have some buffer to drain", + err + ); } } }