ssh_exec
Run shell commands on remote machines over SSH using existing ~/.ssh/config host aliases, capturing stdout, stderr, and exit codes with configurable timeouts.
Instructions
Run a shell command on a remote machine over SSH. host is an alias from your local ~/.ssh/config (see ssh_hosts). The command runs via a non-interactive remote shell; stdout and stderr are captured, truncated at a configured size limit, and reported together with the exit code. Non-zero exit codes are surfaced, not hidden. Default timeout: 30s (override per call with timeout). For long-running jobs, run them in the background remotely and poll.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | SSH config alias of the target host | |
| command | Yes | Command to execute on the remote host | |
| timeout | No | Timeout in milliseconds (default: 30000) |