Ssh Host
@randybias/ssh-hostv2026.10.17.2
01README
Run one argv vector, push bytes atomically, and wait for SSH host keys on any host, under an explicit strict or trust-on-first-use host-key policy. One generic model with no host in its definition; every method takes its target as arguments and stores data keyed by host.
02Behaviors
@randybias/ssh-hostv2026.10.17.2ssh_host.ts
fn exec()
DESTRUCTIVE. Run one argv vector on the host over SSH and return the exit code plus output hashes; each element is a literal argv word, never interpolated into a shell string, but argv can change or break the host and exec cannot roll that back. A non-zero remote exit is data, except 255, which ssh reserves for its own failures and is always reported as a transport error. Never put a secret in argv; stdout and stderr are persisted sensitive-marked and returned only when return_output is set.
fn upload()
DESTRUCTIVE. Push bytes to an absolute path on the host over stdin, atomically: a temporary file in the destination directory is written, chmod'ed and renamed over the destination, overwriting it. Converges on bytes and mode: an unchanged file is not rewritten and no new resource version is written, while a mode-only difference is a chmod. Returns the path, byte count, SHA-256 and whether anything changed; an unwritable path or a destination that is a directory is an error and leaves no partial
fn wait_connection()
READ-ONLY. Poll until the host answers SSH with acceptable host keys or the timeout expires; returns reachable and the accepted host keys with fingerprints. A strict or already-recorded key mismatch is refused immediately; insecure_tofu records the first keys seen for later runs.
Resources
execution(infinite)— Result of one remote command: stdout, stderr and exit code
upload(infinite)— Evidence of one uploaded file: path, mode, bytes, sha256
connection(infinite)— Read-only reachability evidence with accepted host keys
03Previous Versions
2026.10.17.2
2026.10.17.1
04Stats
A
93 / 100
Downloads
8
Archive size
32.6 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned
deno-command1 accepted
Spawns a subprocess with Deno.Command().
- models/_lib/ssh.ts:505 — no reason given
06Platforms
07Labels