diff --git a/mux/src/ssh.rs b/mux/src/ssh.rs index 8c8ce08f5..61b33b1db 100644 --- a/mux/src/ssh.rs +++ b/mux/src/ssh.rs @@ -10,7 +10,6 @@ use async_trait::async_trait; use filedescriptor::{socketpair, FileDescriptor}; use portable_pty::cmdbuilder::CommandBuilder; use portable_pty::{ExitStatus, MasterPty, PtySize}; -use promise::{Future, Promise}; use std::cell::RefCell; use std::collections::{BTreeMap, HashMap, HashSet, VecDeque}; use std::io::{BufWriter, Read, Write}; @@ -76,15 +75,6 @@ impl ssh2::KeyboardInteractivePrompt for ConnectionUI { } } -pub fn async_ssh_connect(remote_address: &str, username: &str) -> Future { - let mut promise = Promise::new(); - let future = promise.get_future().unwrap(); - let remote_address = remote_address.to_owned(); - let username = username.to_owned(); - std::thread::spawn(move || promise.result(ssh_connect(&remote_address, &username))); - future -} - pub fn ssh_connect_with_ui( remote_address: &str, username: &str, @@ -247,14 +237,6 @@ pub fn ssh_connect_with_ui( }) } -pub fn ssh_connect(remote_address: &str, username: &str) -> anyhow::Result { - let mut ui = ConnectionUI::new(); - ui.title("🔐 wezterm: SSH authentication"); - let sess = ssh_connect_with_ui(remote_address, username, &mut ui)?; - ui.close(); - Ok(sess) -} - /// Represents a connection to remote host via ssh. /// The domain is created with the ssh config prior to making the /// connection. The connection is established by the first spawn()