Skip to main content

connect

Function connect 

Source
pub fn connect(
    alias: &str,
    config_path: &Path,
    askpass: Option<&str>,
    bw_session: Option<&str>,
    has_active_tunnel: bool,
) -> Result<ConnectResult>
Expand description

Launch an SSH connection to the given host alias. Uses the system ssh binary with inherited stdin/stdout. Stderr is piped and forwarded to real stderr in real time so the output is captured for error detection. Passes -F <config_path> so the alias resolves against the correct config file. When askpass is Some, delegates to askpass_env::configure_ssh_command to wire up SSH_ASKPASS, SSH_ASKPASS_REQUIRE=force and the PURPLE_* env vars.