Credentials. Your SSH keys and known_hosts must be mounted into the container, so the container can use them while it runs.
Who it is forA developer or CI maintainer whose agent or test job runs in a short-lived container and must run commands on a build box.
The problemBaking an agent into every dev container bloats the image, and mounting one from the host breaks easily.
The outcomeThe disposable container runs reach against a target over SSH and returns command output and exit codes, with no agent or extra credentials baked into the image.
What you need first
- Go toolchain, or a pre-built reach binary from the releases page
- An ssh binary on your machine that already reaches the target
- The coding agent installed on your local machine, such as Claude Code or Codex
- Access to the target over SSH, with keys or config already set up
Steps
- Run
docker run --rm -v "$HOME/.ssh:/root/.ssh:ro" ghcr.io/bojieli/agentreach versionto confirm the image works - Mount your keys and known_hosts into the container as shown in the command above
- Run a command on the target with
reach build-box exec -- go test ./... - Check the target with
reach build-box doctor - Remove the container when the job finishes, since it leaves no state behind
Prompt for your agent
Use the repo bojieli/agentreach from its container image to run <command> on <target> through `reach <target> exec -- <command>`. Expected output: the command's stdout and an exit code. Verify that `reach <target> doctor` reports the target platform before the run.
Caveat. The README says the image carries helper binaries for every target platform but that reach will not invent credentials, so the mounted keys must already work for the target.
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page