Docs menu
docs

CLI reference

From sshsentry --help in 0.2.0. Installed from PyPI the command is sshsentry; from the repo it's python3 sshsentry.py.

OptionWhat it does
-c, --config PATHYAML config path (default /etc/sshsentry/sshsentry.yaml)
--log PATHoverride the log file path
--db PATHoverride the SQLite state path
--replay FILE, --dry-run FILEprocess FILE from the start and print alerts; never sends anything
--onceprocess new log lines once, then exit (timers)
--approve IPmark an IP as known for all users, then exit
--test-alertssend a sample alert to each enabled destination
--digest-nowprint a digest of the last 24 h now (sent if digest.send; print-only with --replay)
--digests [N]list the last N stored daily digests (default 7)
--digest DATEshow one stored daily digest (YYYY-MM-DD)
--resend DATEsend a stored daily digest again
--export-digests START ENDzip stored digests for a date range, with manifest + SHA-256
-o, --output PATHwith --export-digests: zip path
--host-label LABELwith --export-digests: label in the manifest
--verify-chainrecompute the local digest hash chain
--verify-export ZIPverify an exported zip (no config needed)
--expected-head HASHwith --verify-export: a chain hash that left the server earlier
--suggest-thresholdprint the learn-mode threshold suggestion
--accept-thresholdwrite the suggested brute-force threshold into the config
--show-sharedlist everything this install has shared
--forget-medelete local sharing history (and ask the endpoint to delete it, if configured)
--local-onlywith --forget-me: skip the remote request
--format text|jsonoutput format for digests, replay, suggestions, sharing and verify commands

Common recipes

shellsha256:6928498ed7e1
sudo sshsentry --approve 198.51.100.23            # stop new-IP alerts for your office IPsudo sshsentry --test-alerts                      # check email/Slack/webhooksudo sshsentry --digests                          # last 7 days at a glancesudo sshsentry --export-digests 2026-10-01 2026-10-31 -o oct.zipsshsentry --verify-export oct.zip --expected-head 3f9a0c1d2b4e

JSON documents carry a "schema" field (for example sshsentry.replay/1). Timestamps are UTC ISO-8601.