sshz is a minimal, transport-agnostic SSH client and server library written in Zig. Applications drive its asynchronous state machines over any reliable, ordered byte stream.
- Client and server APIs with no internal transport I/O
- Client keyboard-interactive plus client/server public-key, password, and none authentication
- Multiple channels, sessions, port forwarding, and agent forwarding
- Rekeying, delayed compression, resource limits, and deadline enforcement
- Explicit acknowledged keepalives with owned request tokens and transport-flush accounting
- Client-side cancellation of queued, unframed channel data without closing the channel
- Opt-in automatic exec acknowledgment, independent of output and command exit results
- Opt-in server PTY admission and EOF observation, manual receive credit, extended output, and owned exit-status/signal submission
- Interoperability coverage with OpenSSH, Dropbear, and libssh
The authoritative algorithm list and negotiation rules are in the SSH algorithm policy.
sshz requires Zig 0.17.0.
Zlib remains the same pinned, bundled static library. Its stream bindings are
generated with the pinned cataggar/translate-c 2.0.0 and GitHub Aro mirror.
Android consumers may still replace the module's single bundled-library link
and include edge with the NDK/system z library; header translation itself
does not require the NDK. The 0.2.1 channel/authentication contracts are unchanged.
zig build test
zig build production-examplesSee getting started for library commands and the
sshz and sshzd demo programs.
For either role, consume-readiness counts cover only the current incremental read. Leave coalesced following packets in the transport or your own input buffer until requested; see the transport pump contract.
- Production-facing API and lifecycle
- Getting started and demo programs
- Interoperability testing
- Malformed-input testing
- Stress and soak testing
- Resource limits
- Threat model
- Release checklist and platform matrix
Security and support warning: No independent external security review has occurred. sshz is pre-1.0 and unsupported for production use while the documented release blockers and evidence gaps remain.
The 2026-08-21 maintainer-led security review
found and remediated security defects, but it is not an independent review or
production approval. The
release checklist defines the evidence and review
required for a supported release. sshz and sshzd are interoperability demos,
not deployment templates. See SECURITY.md for private
vulnerability reporting.