README.md
atlibs-ssh
Moved: this crate is transports/ssh in atlibs, one commit with the host. This repository is frozen; its pins are not kept.
ssh for atlibs hosts with the system ssh: a transport on
atlibs-host's seam.
| NSID | what |
|---|---|
com.fedfork.exec.ssh.exec | {dest, command, env?, stdin?, stdinFile?} -> {exit, stdout, stderr} |
com.fedfork.exec.ssh.session | subscription: {stream, line} per output line, then {exit}; send {data} is stdin; close disconnects |
The host names each destination (dest, port, key, knownHosts; -F /dev/null unless userConfig) and each
stdin file; a module names them, never a key or a path. env goes as SetEnv (LC_SESSION).
Use
Link it into a Rust host (Cargo.lock from this repo pins the rest):
root=$PWD app=$(mktemp -d)
cp Cargo.lock "$app" && cd "$app" && cargo init -q --name app
cat >> Cargo.toml <<'EOF'
atlibs-host = { git = "https://knotless.dev/johnandersen777.bsky.social/atlibs", rev = "9f1b5ad089faa528b07b49d75965d54535a70e11" }
atlibs-ssh = { git = "https://knotless.dev/johnandersen777.bsky.social/atlibs-ssh", rev = "4129a55b2a4f047b73f3d03b33dbfb7fb2564327" }
EOF
cat > src/main.rs <<'EOF'
fn main() {
let ssh = atlibs_ssh::Ssh::new(Default::default(), Default::default());
let _transport = ssh.transport();
println!("{:?}", atlibs_ssh::NSIDS);
}
EOF
cargo run -q
cd "$root"
["com.fedfork.exec.ssh.exec", "com.fedfork.exec.ssh.session"]
