# ssheep — notes for agents # # Version: early prototype. NOT SECURE. No audit, no security review, protocol # still changing. Do not use for anything important. # # This file is the machine-readable version of https://ssheep.xyz — enough for an # agent to operate a flock without reading prose. WHAT IT IS Control machines ("sheep") from a machine you hold ("the master") through a blind relay ("a connector"). - A sheep only ever dials OUT, so it needs no open port and no public address. - Everything between master and sheep is end-to-end encrypted (X25519 + AES-GCM). A connector forwards ciphertext it cannot read and cannot forge. - The flock is defined by a small signed file (the roster). The only secret is the flock key, which signs rosters and is needed only to add or remove a machine. INSTALL curl -fsSL https://ssheep.xyz/install.sh | sh # alternatives: # download: https://github.com/bash3r777/ssheep/releases/latest # source: git clone https://github.com/bash3r777/ssheep && cd ssheep && make build # static binaries, linux/darwin/windows, amd64/arm64. no other dependencies. STATE Everything lives in ~/.ssheep (overridden by $SSHEEP_DIR): flock.key.json the flock key. SENSITIVE. Keep it off the connector. node.key.json this machine's identity. SENSITIVE. roster.json the signed roster. Public; safe to share. A machine that is already enrolled needs no invite and no arguments: ssheep sheep ROLES master holds the flock key, mints invites, sends commands sheep runs the agent, executes commands connector blind relay + address book. The only role needing a reachable address. One binary does all three; the role is a subcommand. COMMANDS ssheep init --name NAME [--me NAME] create a flock on this machine ssheep connector [--listen :7000] [--public] run a connector ssheep connector add --addr HOST:PORT register one (reads its fingerprint) ssheep connector remove --addr HOST:PORT ssheep connector list show them and whether they answer ssheep invite --name NAME [--out FILE] mint a single-use ticket for a new machine ssheep sheep --invite-file F --install-only unpack a ticket and exit ssheep sheep serve (this machine is already enrolled) ssheep see the flock, live ssheep run --name NAME -- CMD... one machine ssheep run --all -- CMD... every sheep, output prefixed per machine ssheep forget --name NAME revoke a machine ssheep version TYPICAL SEQUENCE 1. master: ssheep init --name myflock 2. connector: ssheep connector --listen :7000 3. master: ssheep connector add --addr :7000 4. master: ssheep invite --name pi --out pi.ticket 5. new machine: ssheep sheep --invite-file pi.ticket --install-only 6. use: ssheep see ; ssheep run --all -- uptime EXIT CODES AND OUTPUT run exits non-zero when a command fails, and prints ": exited with status N". A machine that is revoked stops with "this machine is no longer in the flock". GOTCHAS WORTH KNOWING - More than one connector is worth doing: machines try them in roster order and survive losing any of them. A single connector is a single point of failure. - Online/offline is reported PER CONNECTOR. With several connectors, a machine connected to a different one can show as offline. - A connector serves only the flock it was given unless started with --public. - Revocation is enforced by connectors; a machine already in a direct conversation is not interrupted until it reconnects. - No interactive shell or file transfer yet. run executes and streams output. WHAT IT IS NOT - Not audited. Not hardened. Assume bugs. - No accounts, no telemetry, no SaaS. Nothing phones home. - Not affiliated with any other project; it is ~4k lines of Go, standard library only.