ssh_execute_command
Run commands on a remote server through an existing SSH session. Use chaining to execute multiple commands in the same working directory.
Instructions
Execute a command on the remote host via SSH. Note: Shell environment state like current directory (cd) is NOT preserved between distinct tool calls. To run multiple commands in the same path, chain them (e.g. 'cd /var/www && ls -la').
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_execute_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionId | Yes | The session ID returned by ssh_connect | |
| command | Yes | The command line string to run on the remote shell | |
| timeoutMs | No | Execution timeout in milliseconds (default: 30000) |