Skip to content

v2.5.0

Choose a tag to compare

@github-actions github-actions released this 12 May 04:22
· 3 commits to master since this release
bfa3180
nssh: harden session recovery (#11)

Hardens the per-host session-recovery mechanism added in the original checkpoint.

- Skip `prepareRemote` SSH when joining an existing host session — the remote state was already set up by the first connect.
- Replay missed messages on reconnect via ntfy `?since=<id>`; track lastID across drops. Solves the laptop-closed-overnight case directly.
- New `subscribe-up` / `subscribe-down` LogEvent entries with reconnect gap, rendered by `nssh status --tail`.
- New `ping` / `pong` wire kinds + `pingTopic` helper to distinguish "alive" from "wedged" peers.
- Collision prompt when an existing session is found for the host: `[J]oin / [R]eplace (SIGTERM then SIGKILL) / [N]ew / [C]ancel`; default depends on liveness ping. Non-interactive shells silently join with a stderr warning. Flags: `--join` / `--replace` / `--new`.
- New `nssh sweep [--all|--older <dur>] <host>` subcommand to clean up orphan `mosh-server` processes on a remote. Safe with tmux-inside-mosh.

Follow-ups: #10 (auto-sweep on connect, spare-yourself in --all), #12 (per-session env-injection design — properly fixes the single-session-file rendezvous limitation).