Expand description
Thin helpers for running external SSH tools via duct.
These wrap the few operations that require shelling out:
FIDO key generation, ssh-keyscan, ssh-copy-id, passphrase changes, etc.
All calls go through tokio::task::spawn_blocking to avoid blocking the
async runtime.
The CliRunner trait abstracts over command execution for testability.
Production code uses DefaultCliRunner which delegates to
toride_runner::TokioRunner; tests swap in MockCliRunner.
Structs§
- Default
CliRunner - Production
CliRunnerthat delegates toTokioRunnerfromtoride-runner, which usestokio::processinternally. - Mock
CliRunner - A canned-response
CliRunnerfor unit tests.
Traits§
- CliRunner
- Abstraction over external command execution.
Functions§
- ssh_
add_ list - Run
ssh-add -lto list agent identities. - ssh_
copy_ id - Run
ssh-copy-id -i <pubkey> <dest>. - ssh_
keygen - Run
ssh-keygenwith the given arguments and return stdout. - ssh_
keyscan - Run
ssh-keyscan -H <host>and return the host key lines. - ssh_
keyscan_ no_ hash - Run
ssh-keyscan <host>(without-H) and return the host key lines. - tool_
exists - Check whether a tool exists in
PATH.