ssh-commander
Async Rust domain layer for SSH, SFTP, FTP/FTPS, PostgreSQL, and connection management. The shared engine that powers midnight-ssh — extracted as a standalone library so any Rust client can use it.
Crates
| Crate | Purpose |
|---|---|
ssh-commander-core |
SSH, SFTP, FTP/FTPS, Postgres explorer, connection manager, event bus, macOS keychain. |
ssh-commander-pg-parquet |
Parquet export pipeline for the Postgres explorer (pulls in arrow + parquet — opt-in). |
Pull in only what you need: the core crate has zero arrow/parquet weight unless you also depend on ssh-commander-pg-parquet.
Features
- SSH (via
russh) — password and public-key auth, PTY shell sessions, known-hosts (TOFU),execwith capture, port forwarding, agent auth. - SFTP — full file ops, recursive transfer, attribute introspection.
- FTP / FTPS (via
suppaftp). - PostgreSQL explorer — schema introspection, paginated cursor reads, edits, exec, parquet export, optional SSH tunneling.
- Connection manager —
Arc<RwLock<HashMap>>-backed lifecycle for sessions across protocols. - Typed event bus — single broadcast channel for async PTY output, transfer progress, and status updates.
- macOS Keychain integration (gated on
cfg(target_os = "macos")).
Install
[]
= "0.1"
# Optional: Parquet export for the Postgres explorer
= "0.1"
Requires Rust 1.95+ (edition 2024).
Usage
use ;
use ConnectionManager;
async
See docs.rs/ssh-commander-core for the full API.
Status
0.1.x — pre-1.0, expect API changes. Originally extracted from a multi-crate workspace; the published surface is opinionated and follows the consumer's needs. Issues and PRs that improve generality are welcome.
License
Dual-licensed under either of:
- Apache License, Version 2.0 (
Apache-2.0) - MIT license (
MIT)
at your option.
This crate is derived from work originally licensed MIT by GOODBOY008 (the upstream r-shell project); their copyright notice is preserved in LICENSE-MIT.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.