Skip to content

Repository files navigation

sshz

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.

Features

  • 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.

Quick start

sshz requires Zig 0.16.0.

zig build test
zig build production-examples

See 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.

Documentation

Project status

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.

About

A minimal, transport-agnostic SSH client and server library for Zig.

Topics

Resources

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages