Expand description
toride-ssh — async SSH manager library.
This is the facade crate that re-exports all sub-crates behind a
unified API. The entry point is SshManager, which resolves ~/.ssh
paths and provides accessor methods for each subsystem.
§Subsystem accessors
SshManager::keys— key generation, inventory, repairSshManager::config— config parsing, editing, resolutionSshManager::agent— SSH agent interaction (feature:agent)SshManager::authorized_keys— authorized_keys management (feature:authorized-keys)SshManager::doctor— diagnostic checks (feature:doctor)SshManager::known_hosts— known_hosts management (feature:known-hosts)SshManager::forward— port forwarding via ControlMaster (feature:forward)- [
SshManager::certificate] — SSH certificate/CA operations (feature:certificate)
§Testing with a custom CLI runner
Use SshManager::with_cli_runner to inject a MockCliRunner so that
no real SSH processes are spawned during tests.
Re-exports§
pub use toride_ssh_config as config;pub use toride_ssh_key as key;pub use toride_ssh_agent as agent;pub use toride_ssh_doctor as doctor;pub use toride_ssh_forward as forward;pub use toride_ssh_known_hosts as known_hosts;
Modules§
- paths
- SSH path resolution for the
~/.sshdirectory layout. - privilege
- Privilege-escalation helpers for operations that need root.
- runner
- Thin helpers for running external SSH tools via
duct. - undo
- Undo/restore mechanism for file mutations.
Structs§
- Default
CliRunner - Production
CliRunnerthat delegates toTokioRunnerfromtoride-runner, which usestokio::processinternally. - Diagnostic
- A single diagnostic finding from the SSH doctor.
- Fingerprint
- SHA-256 fingerprint of an SSH key.
- KeyCreate
Params - Parameters for creating a new SSH key.
- KeyDelete
Params - Parameters for deleting an SSH key.
- Mock
CliRunner - A canned-response
CliRunnerfor unit tests. - Permissions
- Unix file permission mode.
- SshKey
- A discovered SSH key with metadata.
- SshManager
- Entry point for all SSH management operations.
- SshPaths
- Resolved paths for the
~/.sshdirectory.
Enums§
- Diagnostic
Severity - Re-export
toride_diagnostic_types::Severityfor consumers that need the shared ecosystem severity type (used by doctor reports, UI, etc.). How serious a diagnostic finding is. - Error
- Errors returned by
toride-sshoperations. - KeyFormat
- Target format for key conversion.
- KeySource
- Where a key was discovered.
- KeyType
- SSH key algorithm.
- Privileged
Op - An operation that requires elevated privileges to perform.
- Severity
- Diagnostic severity level.
Traits§
- CliRunner
- Abstraction over external command execution.
Functions§
- is_root
- Return
truewhen the process is running as root (effective UID 0). - run_
privileged - Execute a privileged operation asynchronously.
Type Aliases§
- Result
- Alias for results in this crate.