vault_ssh_exec
Run commands or rsync files on a remote host using a vaulted SSH key that never leaves the broker. Audits every signature and enforces admin access gates.
Instructions
Run a command on a remote host, or rsync files to it, using a vaulted SSH key that is never written to disk and never returned to you.
Admin keys: a server can have an everyday key (use it by default: reading code, health, logs) and an admin key (for changes: deploys, settings, containers). The admin key works only while your owner has allowed admin access (5, 15 or 60 minutes); without it you get ADMIN_ACCESS_REQUIRED and your owner is asked. The connection is closed when admin access ends. Call vault_done when you have finished.
The key stays inside the broker, which answers signature requests over a private ssh-agent socket that exists only for the duration of this call. You choose the remote command; you do not get the key.
The destination is checked against the servers approved for the entry, and the ssh command line is constructed here — naming a different host inside remote_argv does not change where it connects. A key the owner saved without servers asks the owner the first time it connects to a new user@host[:port] (write it exactly that way; the call waits for the answer), and that server's identity is remembered: a different machine at the same address is refused.
Every signature is audited with the key fingerprint and the authorised host.
ADMIN (sudo) work on a computer: use the owner's admin key (an SSH key made on that computer with its admin-key script) with destination root@localhost and run the command directly — no sudo, no password. You never get the sudo password; it is not in the vault for you.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entry_id": "<entry_id>",
"destination": "<destination>",
"purpose": "<purpose>"
},
"name": "vault_ssh_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| purpose | Yes | Why this is needed (audit log). | |
| entry_id | Yes | Vault entry holding the SSH private key (ed25519, unencrypted). | |
| rsync_args | No | rsync arguments instead of a remote command. Every [user@]host:path argument is checked against the same allowlist. | |
| destination | Yes | Remote destination, [user@]host. The host part must be in the entry's ssh_hosts. | |
| remote_argv | No | Command and arguments to run on the remote host. An array, run without a shell. Omit when using rsync_args. | |
| working_dir | No | Local working directory for rsync source paths. | |
| timeout_seconds | No | Default 120. |