Structs§
- Connect
Result - Result of an SSH connection attempt.
Functions§
- connect
- Launch an SSH connection to the given host alias.
Uses the system
sshbinary 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. Whenaskpassis Some, delegates toaskpass_env::configure_ssh_commandto wire up SSH_ASKPASS, SSH_ASKPASS_REQUIRE=force and the PURPLE_* env vars. - connect_
tmux_ window - Open an SSH connection in a new tmux window. Returns immediately after the window is created. The SSH session runs asynchronously in the new window. Returns an error if tmux is not available or the window cannot be created.
- connect_
tmux_ window_ with_ remote_ command - tmux variant of
connect_with_remote_command. Opens a new tmux window runningssh -t <alias> <remote_command>so the TUI stays alive in the original window. Same askpass-incompatible caveat asconnect_tmux_window. - connect_
with_ remote_ command - Launch an SSH connection that runs a single remote command in
interactive mode. Mirrors
connect()exactly except for two additions:-tto allocate a TTY (required for the remote shelldocker execopens) and the trailingremote_commandstring passed to ssh as one argv slot. The remote shell receives the string as a single command line, so multi-token commands and shell operators like||work naturally. - is_
in_ tmux - Returns true if the process is running inside a tmux session, per the
resolved environment (so tests inject
TMUXviaEnvinstead of mutating the process env). - parse_
host_ key_ error - Parse host key verification error from SSH stderr output. Returns (hostname, known_hosts_path) if the error is a changed host key.
- stderr_
summary - Extract a concise reason from SSH stderr for display in the toast.
Joins all non-empty, non-banner lines with
|so the full context is visible. Truncates to 200 chars (char-safe) if needed.