ssh

A command that finds the connection details for a Crabbox leased machine and prints an SSH command. SSH is a standard way to open a secure terminal session on another computer; this command does not open the session itself.

In plain words
What is it for?
Use it to prepare SSH commands for a lease, choose a network or provider, connect to a named machine, and retrieve the exact command Crabbox expects.
Why use it?
It saves you from finding the machine address, port, user, key, and connection options manually. The printed command can be copied, piped into another tool, or wrapped in a script.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/openclaw/crabbox/ssh
Clone the repo
git clone --depth 1 https://github.com/openclaw/crabbox
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,142 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01142
Opus 5 $0.00000 $0.00571
Sonnet 5 $0.00000 $0.00228
Haiku 4.5 $0.00000 $0.00114

Measured yesterday against content hash d458accf3a21, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ssh scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/ssh.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ssh

crabbox ssh resolves a lease and prints a ready-to-run ssh command for it. It does not open a connection itself — it prints the command so you can copy it, pipe it, or wrap it in your own tooling.

Use crabbox connect when you want Crabbox to open the interactive SSH session directly.

crabbox ssh --id swift-crab
crabbox ssh --id swift-crab --network tailscale
crabbox ssh --provider ssh --target macos --static-host mac-studio.local

The first positional argument is treated as the lease id or slug, so crabbox ssh swift-crab is equivalent to crabbox ssh --id swift-crab.

What it prints

The printed command includes the per-lease private key (-i <key>) when Crabbox generated one, the resolved host, user, and port, and the connection options Crabbox uses internally (BatchMode, StrictHostKeyChecking=accept-new, a per-lease known_hosts file, and connection keepalives). For most providers that is a plain ssh -i … user@host -p <port> line you can run as-is.

crabbox ssh validates the local repo claim, then attempts a best-effort lease refresh to signal intended manual use. The refresh has a 20-second budget; failure warns and printing continues without guaranteeing renewed expiry. Cancellation by the caller stops the command without printing a successful result. Pass --reclaim when you are intentionally taking over a lease that is claimed by another repo checkout.

Network selection

The --network flag controls which path to the box the command targets:

  • auto (default) prefers the tailnet host when the lease carries Tailscale metadata and this client can reach it, otherwise falls back to the public provider host.
  • tailscale requires the tailnet path and fails if it is unavailable.
  • public always uses the provider's public host.

Provider-specific behavior

crabbox ssh works for any provider that exposes an SSH-reachable box. A few providers resolve access lazily or wrap the connection:

  • provider=ssh (aliases static, static-ssh) resolves the configured static target from --static-host/--static-user/--static-port (or the matching config keys / CRABBOX_STATIC_HOST) instead of a leased machine.
  • Token-based providers (for example daytona) authenticate with a short-lived SSH token embedded in the command. Crabbox redacts that secret by default and prints a warning; pass --show-secret only when you need a pasteable command in a trusted terminal.
  • Proxy-based providers (for example sprites) print an ssh command with a provider ProxyCommand rather than a direct host connection.
  • provider=xcp-ng resolves the VM IPv4 address from XCP-ng guest metrics during provisioning, then prints the normal per-lease SSH command for the cloud-init user.
  • provider=coder prints a proxy-backed SSH command that uses coder ssh --stdio --wait <mode> <workspace>. Coder owns authentication and tunneling; Crabbox does not print or pass Coder tokens on argv.
  • Provider-routed direct providers accept the same provider-specific routing flags here as status and stop; for example --kubevirt-context or --external-routing-file can select the exact lease backend when config defaults are not enough.

Read the full file on GitHub · 100 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 100 lines · 0 tokens per session scan A d458accf3a21

Subscribe to this mod's changes

ssh is a command published in the GitHub repository openclaw/crabbox (1,343 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,142 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.