ssh_exec
Execute shell commands on a connected SSH host and return stdout, stderr, exit code, and duration for remote command execution and diagnostics.
Instructions
Execute a shell command on a connected SSH host and return stdout, stderr, exit code, and duration.
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": {
"connectionId": "<connectionId>",
"command": "<command>"
},
"name": "ssh_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Extra environment variables for the command | |
| pty | No | Allocate a pseudo-TTY (merges stdout/stderr, useful for sudo) | |
| command | Yes | Shell command to execute | |
| timeout | No | Command timeout in ms (default 30000) | |
| connectionId | Yes | Connection ID from ssh_connect |