Skip to main content

Module ssh

Module ssh 

Source

Re-exports§

pub use host_keys::HostKeyMismatch;
pub use host_keys::HostKeyStore;
pub use host_keys::HostKeyStoreAccessError;
pub use host_keys::HostKeyVerificationFailure;
pub use host_keys::Verdict;
pub use host_keys::VerificationFailureSlot;

Modules§

host_keys
shell
Safe argument quoting for remote shell commands.

Structs§

Client
russh Handler that verifies each server host key against a HostKeyStore.
CommandOutput
Structured result of running a remote command. Callers that need to branch on the exit code or separate the streams should consume this directly; the convenience execute_command merges the streams for display.
PtySession
SshClient
SshConfig

Enums§

AuthMethod

Constants§

SFTP_CHUNK_SIZE
Chunk size used for streaming SFTP transfers. 32 KiB balances throughput against memory overhead for concurrent transfers. Larger sizes hit diminishing returns because SFTP’s window management caps effective pipelining anyway.

Statics§

PREFERRED_HOST_KEY_ALGOS
Preferred host-key algorithms advertised to the server, ordered from most to least preferred. RSA variants (including the legacy ssh-rsa / SHA-1) are included so that older servers that only offer RSA host keys are still reachable. The openssl feature on russh / russh-keys must be enabled for the RSA entries to have any effect.
PREFERRED_KEX_ALGOS
Key-exchange algorithms offered to the server, most-preferred first.

Functions§

format_mismatch
Render a mismatch into a user-facing error message.
format_verification_failure