purple-ssh 3.27.0

Free, open-source terminal SSH manager and SSH config editor in Rust for macOS and Linux that keeps ~/.ssh/config in sync with 18 cloud providers, monitors live SSH tunnels and manages Docker and Podman containers fleet-wide. Spin up a VM, it shows up. Destroy it, it dims. Plus scp, Vault SSH certs and an MCP server for AI agents. MIT licensed.
Documentation
use std::path::{Path, PathBuf};

/// Common SSH connection context passed to remote operations.
pub struct SshContext<'a> {
    pub alias: &'a str,
    pub config_path: &'a Path,
    pub askpass: Option<&'a str>,
    pub bw_session: Option<&'a str>,
    pub has_tunnel: bool,
    pub env: &'a crate::runtime::env::Env,
}

/// Owned variant for spawning into threads.
pub struct OwnedSshContext {
    pub alias: String,
    pub config_path: PathBuf,
    pub askpass: Option<String>,
    pub bw_session: Option<String>,
    pub has_tunnel: bool,
    pub env: std::sync::Arc<crate::runtime::env::Env>,
}