ssh_exec
Run commands on a remote SSH server and get stdout, stderr, and exit code.
Instructions
Execute a command on a connected SSH server. Returns 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": {
"sessionId": "<sessionId>",
"command": "<command>"
},
"name": "ssh_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the command | |
| env | No | Environment variables as key-value pairs | |
| pty | No | Allocate a PTY for the command (useful for interactive commands) | |
| command | Yes | Command to execute on the remote server | |
| sessionId | Yes | Session ID from ssh_connect |