ssh_exec
Execute read-only or safe commands on a remote server via SSH, with destructive commands automatically blocked.
Instructions
Execute a read-only or safe command on the remote server. Destructive commands are blocked (rm, mv, chmod, systemctl, kill, firewall tools, SQL DROP/DELETE/ALTER/TRUNCATE, and similar). Use ssh_read_file to read files instead of cat.
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 |
|---|---|---|---|
| cwd | No | Working directory for the command | |
| command | Yes | Command to execute | |
| timeout | No | Command timeout in milliseconds | |
| connectionId | Yes | ID of an active SSH connection |