Skip to main content

Module ssh_utils

Module ssh_utils 

Source
Expand description

Platform-independent SSH utilities.

These utilities work on all platforms and don’t depend on openssh.

Structs§

CommandResult
Result of a remote command execution.
EnvPrefix
Environment variable prefix for remote command execution.

Functions§

build_env_prefix
Build a shell-safe environment variable prefix from an allowlist.
is_retryable_transport_error
True if an SSH/transport error looks retryable (transient network / transport).
is_retryable_transport_error_text
Message-only variant of is_retryable_transport_error (useful for tests).
is_valid_env_key
Check if a string is a valid environment variable key.
shell_escape_path_with_home
Escape a path for use in a shell command, allowing ~ to expand to $HOME.
shell_escape_value
Escape a string for use in a shell command.