Skip to content

SSH connectivity

Clawforce establishes a secure connection to each agent instance using SSH. This connection carries all traffic to the instance — browser access, terminal sessions, file operations — without requiring any ports to be opened or configured on the instance side.

From a user’s perspective, the connection is automatic and invisible: click Browser or Terminal and you’re in. Under the hood, Clawforce authenticates using a single global ED25519 key pair, monitors connection health continuously, and reconnects automatically if anything drops.


Clawforce generates one ED25519 key pair on first run, stored in the data directory (/app/data/ssh_key and /app/data/ssh_key.pub). The same public key is uploaded to every agent’s authorized_keys when a connection is established.

Before establishing an SSH connection, Clawforce uses the orchestrator (via kubectl exec or docker exec) to write the public key to the agent’s /root/.ssh/authorized_keys. This ensures connectivity even after a container restart that clears the filesystem.


On the instance details tab you can check the SSH connection status:

StateMeaning
DisconnectedNo active connection; not attempting to connect
ConnectingInitial connection attempt in progress
ConnectedSSH tunnel is active
ReconnectingConnection lost; retrying automatically
FailedAll retry attempts exhausted

Clawforce monitors connections at three layers:

LayerIntervalMethod
SSH keepalive30 sSSH protocol-level ping
App health check30 secho ping command over SSH
Tunnel health60 sTCP probe to local tunnel port

If any layer detects a failure, automatic reconnection is triggered.


Rotate the global key pair from SettingsSSH KeysRotate key. The rotation process maintains live connectivity throughout — both old and new keys work temporarily while the switch is made.