ssh_execute
Execute shell commands on a remote SSH host and receive structured output with stdout, stderr, and exit code for stateless command runs.
Instructions
Execute a command on the remote host and return structured output. Each call runs in an independent exec channel -- no state is shared between calls (use ssh_shell_* tools for persistent state).
Args: session_id: The session ID returned by ssh_connect. command: Shell command to execute. timeout: Maximum seconds to wait for the command to finish (default: 120).
Returns: Dict with stdout, stderr, and exit_code.
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": {
"session_id": "<session_id>",
"command": "<command>"
},
"name": "ssh_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| command | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||