ssh-audit
$ ssh-audit Official Low Riskssh-audit (ssh-audit) inspects SSH servers (ssh-audit <host>) and connecting SSH clients (-c) for weak key-exchange algorithms, ciphers, MACs, and host keys. Supports -j JSON output, -n no-color mode, -P compliance policies, and deterministic exit codes.
brew install ssh-audit ssh-audit conducts raw TCP/SSH handshake inspection directly from the host network with -j JSON output.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
First-class -j JSON output, -n no-color flag, -P policy mode, and distinct exit codes for warnings vs failures.
- Native
-j/--jsonand-n/--no-colorsflags - Non-interactive execution with informative exit codes
Strictly read-only handshake inspection with zero local file writes and no credentials required.
- Performs only SSH algorithm negotiation without authentication attempts
Pure Python package with zero third-party runtime dependencies, installable via brew, pip, uvx, or prebuilt releases.
- Zero-dependency Python CLI across macOS, Linux, and Windows
Audits KEX, host keys, ciphers, MACs, CVEs, and policy compliance in a single sub-second run.
- Comprehensive SSH algorithm + policy audit in one call
Actively maintained by Joe Testa (jtesta/ssh-audit) under MIT license with up-to-date CVE and OS policy databases.
- Active
jtesta/ssh-auditrepository
Clear README, hardening guides, and --help flag reference.
- Detailed hardening guides on ssh-audit.com
Security, Auth & Guardrails
No authentication credentials required; performs unauthenticated SSH banner and algorithm negotiation handshakes.
MIT open-source CLI; free with no external API limits.
# ssh-audit Agent Rules - Always pass `-j` (and `-n` if falling back to text) for clean, ANSI-free parsing. - Only scan SSH hosts you own or are authorized to audit.
Agent-Ready Command Recipes
Safe Read-Only Queries
ssh-audit -j -p 22 bastion.example.com
Probes bastion.example.com on port 22 and emits structured JSON algorithm ratings and CVEs via -j.
ssh-audit -j -P "Hardened Ubuntu Server 22.04 LTS (version 1)" bastion.example.com
Validates negotiated server algorithms against the specified -P policy baseline.
Strengths for Agents
- + Zero-dependency install (
brew,pip,uvx) and native-jJSON output. - + Built-in
-POS hardening policies and distinct exit codes simplify CI/agent pass-fail gating.
Caveats & Pitfalls
- ! Non-zero exit codes indicate security findings as well as connection errors—inspect JSON or stderr to distinguish them.