ssh_shell_exec
Execute shell commands on a remote SSH host's working directory and return stdout, stderr, exit code, and outcome, with optional sudo and timeout controls.
Instructions
Execute a command in this host's working directory. Returns stdout, stderr, exitCode and outcome. Default timeout is 120 seconds; 0 disables it. sudo:true runs the entire command as root without an approval dialog; set sudo credentials with ssh_set_credentials when required. Never include passwords in command or stdin. Temporary cd does not change the stored directory. Never replay an unknown outcome automatically.
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": {
"hostId": "<hostId>",
"command": "<command>"
},
"name": "ssh_shell_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sudo | No | ||
| stdin | No | ||
| hostId | Yes | Required stable host ID returned by ssh_list_hosts. Names are not accepted. | |
| command | Yes | ||
| timeoutMs | No |