Expand description
Cliente SSH real via russh 0.62.2.
One-shot connection: TCP + handshake + auth (password and/or key) + exec with
timeout, output truncation, and best-effort remote abort.
Host keys: TOFU em known_hosts XDG (ver super::known_hosts).
§Workload classification (resource economy)
- Class: I/O-bound (SSH/TCP + disk SCP). Not CPU-bound.
- Runtime: Tokio multi-thread (see
main.rs) for russh crypto/IO + tunnel accept fan-out — not a substitute for CPU parallelism. - No Rayon / no process pool: one-shot single session; coordination cost exceeds any local CPU fan-out on the agent path.
- Capture RAM: stdout/stderr bounded by
max_chars×4bytes (UTF-8 worst case) and hard-capped at [EXEC_CAPTURE_HARD_MAX_BYTES] per stream. - SCP: stream in 32 KiB chunks to/from disk (no full-file heap load);
disk I/O uses
tokio::fsso the async worker is not blocked on syscalls. - Latency: RTT-bound; decode path reuses the capture
Vecvia [take_utf8_capped] when remote bytes are valid UTF-8.
Re-exports§
pub use super::connection::ConnectionConfig;
Structs§
- Client
Handler ssh-real - Real SSH client backed by
russh(default featuressh-real). russh handler with TOFU known_hosts (or test-only always-trust when path is absent). - Execution
Output - Output of a remote SSH command execution.
- SshClient
ssh-real - Real SSH client backed by
russh(default featuressh-real). Active SSH client with an authenticated session. - Transfer
Result - Result of an SCP file transfer operation.
Traits§
- SshClient
Trait - SSH client trait allowing a real (russh) or mock implementation for tests.
- Tunnel
Channel - Bidirectional stream used for SSH tunnel (direct-tcpip).
Functions§
- truncate_
utf8 - Truncates a UTF-8 string to at most
max_charscodepoints.