ssh_exec
Run allow-listed shell commands on a preset SSH host and return stdout, stderr, and exit code, with key-based auth, approval prompts, and audit logging.
Instructions
Run a shell command on the preset's SSH host. The command must
match one of the preset's allowed_commands regexes (anchored
^...$). Words are separated by single spaces and may contain only
letters, digits and - _ . / : = @ , + %; quotes, $, backticks,
globs, redirections and other shell syntax are refused. Returns
stdout, stderr, and exit_code. Key-based auth only; host key is
verified against the user's known_hosts file.
Sensitive presets trigger the approval prompt. If the user
previously approved a time-boxed window for this preset+action,
the call proceeds without a new prompt and is recorded as
'windowed' in the audit log. Every call is recorded to the audit log.
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": {
"preset_name": "<preset_name>",
"command": "<command>"
},
"name": "ssh_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| preset_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notice | No | Set when mcp-warden stopped reading the output (over the limit). | |
| stderr | Yes | ||
| stdout | Yes | ||
| exit_code | No |