connect

A command that opens an interactive SSH connection to a Crabbox-managed remote machine. SSH is a standard way to open a terminal on another computer over a network.

In plain words
What is it for?
Use it to connect to a lease by ID or name and work on the remote machine directly. It supports provider, target and network options, including connections through Tailscale or a fixed host.
Why use it?
It resolves the right machine and connection settings for you, including the user, port, private key and network route. Opening the session also keeps the lease active while you work.

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/connect
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 928 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.00928
Opus 5 $0.00000 $0.00464
Sonnet 5 $0.00000 $0.00186
Haiku 4.5 $0.00000 $0.00093

Measured 2d ago against content hash 78c35352418a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

connect 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 2d ago.

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/connect.md · 87 lines

How it starts

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

connect

crabbox connect resolves a lease and opens an interactive SSH session to it. It accepts the same provider, target, and network resolution flags as crabbox ssh, but runs the local ssh client directly instead of printing a command string.

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

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

What it opens

The command uses the resolved SSH target directly: host, user, port, per-lease private key, optional certificate, optional provider ProxyCommand, host-key policy, and connection keepalives. It does not pass through a shell and does not print token-based SSH auth material.

crabbox connect touches the lease as a side effect. Opening an interactive session signals intended manual use, so the lease's idle timer is refreshed and the local repo claim is validated. While the SSH process is running, Crabbox keeps coordinator-backed leases heartbeating and marks direct-provider leases running/ready where supported. 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 SSH session 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 connect 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-as-username providers are rejected by connect because safely handing their secret username to every supported OpenSSH client is not portable. Use crabbox ssh --show-secret in a trusted terminal.
  • Proxy-based providers pass the provider ProxyCommand directly to ssh.
  • Provider-routed direct providers accept the same provider-specific routing flags here as status, stop, and ssh; 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 · 87 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. 2d ago First seen · 87 lines · 0 tokens per session scan A 78c35352418a

Subscribe to this mod's changes

connect is a command published in the GitHub repository openclaw/crabbox (1,343 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 928 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.