ssh_exec
Execute a single command on a remote host over SSH using password or key authentication, returning stdout, stderr, and exit code.
Instructions
Execute a single command via SSH (uses paramiko, no sshpass dependency). host: target IP or hostname username: SSH username password: SSH password (leave empty if using key) key_file: path to private key file (leave empty if using password) command: shell command to execute port: SSH port (default 22) timeout: command timeout in seconds (default 60) Returns: stdout, stderr, return_code (or error if connection/auth failed)
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": {
"host": "<host>",
"username": "<username>"
},
"name": "ssh_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| port | No | ||
| command | No | id | |
| timeout | No | ||
| key_file | No | ||
| password | No | ||
| username | Yes |