No description
  • Scheme 61.3%
  • C 30.3%
  • Shell 6.4%
  • Makefile 1.9%
Find a file
ober 6fbed9f36e
Some checks failed
required-ci / required (push) Failing after 3m44s
Merge pull request #5
2026-09-19 16:47:50 -04:00
.forgejo Use FreeBSD Forgejo CI runner 2026-08-03 14:52:23 -06:00
.jerboa Security hardening and release readiness 2026-06-23 10:51:38 -06:00
docs fix: close security audit findings 2026-07-11 17:25:27 -06:00
scripts Add OpenSSH config proxy support 2026-08-11 11:13:28 -06:00
src fix: honor SSH channel flow control 2026-09-10 23:06:24 -06:00
support Set up Forgejo CI/CD policy 2026-08-03 12:50:53 -06:00
tests Add OpenSSH config proxy support 2026-08-11 11:13:28 -06:00
.gitignore fix: close security audit findings 2026-07-11 17:25:27 -06:00
.gitsafeignore Set up Forgejo CI/CD policy 2026-08-03 12:50:53 -06:00
AGENTS.md docs(agents): add checkout hygiene policy (work dirs under ~/work, cleanup when done) 2026-09-12 19:17:59 -06:00
bcrypt_pbkdf.c fix: close security audit findings 2026-07-11 17:25:27 -06:00
bcrypt_pbkdf.h fix: close security audit findings 2026-07-11 17:25:27 -06:00
jerboa_ssh_crypto.c Add OpenSSH config proxy support 2026-08-11 11:13:28 -06:00
jerboa_ssh_crypto.h Add OpenSSH config proxy support 2026-08-11 11:13:28 -06:00
jerboa_ssh_shim.c WIP: ssh-agent key forwarding + lazy loader lstat; generated-lib P1 hardening 2026-07-22 13:18:52 -06:00
jpkg.sexp Add OpenSSH config proxy support 2026-08-11 11:13:28 -06:00
LICENSE Switch to MIT license 2026-07-21 13:42:20 -06:00
Makefile Add OpenSSH config proxy support 2026-08-11 11:13:28 -06:00
README.md fix: close security audit findings 2026-07-11 17:25:27 -06:00
SECURITY.md fix: close security audit findings 2026-07-11 17:25:27 -06:00
VERSION fix: honor SSH channel flow control 2026-09-10 23:06:24 -06:00

jerboa-ssh

An SSH client and in-process SSH agent for Jerboa. It implements SSH agent protocol support with Ed25519 keys plus SSH transport, auth, command execution, SFTP, and port-forwarding modules.

Private key seeds are stored in pinned C memory when supported and zeroed on removal and shutdown. Signing happens in C via OpenSSL; only signatures and public metadata cross the FFI boundary.

Features

  • SSH agent protocol compatible with ssh, git, scp, and ssh-add.
  • Ed25519 OpenSSH private key parsing, including encrypted key prompting.
  • SSH client transport with Curve25519 key exchange, Ed25519 host keys, ChaCha20-Poly1305, AES-256-CTR, and HMAC-SHA2-256.
  • Background Unix-domain socket agent server.
  • Statically registered production native symbols plus an explicit development-only dynamic-loader opt-in.
  • Collect-safe, pinned-buffer TCP I/O with connect, per-operation, and total handshake/SFTP deadlines.

Prerequisites

  • Jerboa jerbuild (make can bootstrap v0.2.3 into .jerboa/bin).
  • A supported, patched OpenSSL development package. Release evidence currently accepts OpenSSL 4.0.1+, 3.6.3+, 3.5.7+, 3.4.6+, or 3.0.21+.
  • C compiler and pthreads.
  • ssh-keygen/ssh-add for the agent test.

Building And Testing

make build
make test-all
make audit
make sbom
make reproducibility-report
make target-evidence
make release-evidence

make test-integration requires a configured localhost SSHD and ~/.ssh/id_ed25519; it is intentionally not part of deterministic CI.

Usage

(import (jerboa-ssh))

(ssh-agent-load-key-file "~/.ssh/id_ed25519")
(ssh-agent-start)

;; ssh, git, and other child processes can now use SSH_AUTH_SOCK.

(ssh-agent-list-keys)
(ssh-agent-stop)
(import (jerboa-ssh))

(let ([conn (ssh-connect "example.com" 22 "user" "~/.ssh/id_ed25519")])
  (ssh-run conn "id -u")
  (ssh-disconnect conn))

The default verifier rejects unknown hosts. Pre-seed the applicable known_hosts file after authenticating the displayed host-key fingerprint; the library never silently converts an unknown, hashed, revoked, or unsupported entry into TOFU acceptance.

Security

This repository is still experimental. See SECURITY.md and docs/ffi-boundary.md for release gates, FFI ownership rules, socket behavior, known-host policy, and production-readiness requirements.

Production support is blocked until make target-evidence records a marker-complete proof through JSSH_TARGET_PROOF_FILE; production release hosts should set JSSH_REQUIRE_TARGET_PROOF=1. The proof covers target localhost auth fixture evidence, OpenSSL advisory/linkage review, platform CVE review, external SSH protocol review, agent key-material review, known-hosts policy review, and cross-platform smoke. It must not contain private keys, tokens, raw SSH session captures, private paths, hostnames, customer data, or raw command output.

License

Apache License 2.0. See LICENSE.