Async Rust domain layer for SSH, SFTP, FTP/FTPS, PostgreSQL, and connection management.
| Crate | Release | Docs | 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.
- 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")).
[dependencies]
ssh-commander-core = "0.1"
# Optional: Parquet export for the Postgres explorer
ssh-commander-pg-parquet = "0.1"Requires Rust 1.95+ (edition 2024).
use ssh_commander_core::ssh::{SshConfig, AuthMethod};
use ssh_commander_core::connection_manager::ConnectionManager;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let mgr = ConnectionManager::new();
let config = SshConfig {
host: "example.com".into(),
port: 22,
user: "alice".into(),
auth: AuthMethod::Password { password: "secret".into() },
..Default::default()
};
let connection_id = mgr.create_connection(config).await?;
// … use the connection for shell sessions, command execution, file transfer
Ok(())
}See docs.rs/ssh-commander-core for the full API.
Fast checks, live Postgres tests, and protocol smoke-test commands are documented
in docs/qa.md.
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.
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.
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.