ssh-run
Execute shell commands in an SSH session with intelligent completion detection, safe mode blocking, and automatic async transition for long-running commands.
Instructions
Execute a command in the SSH session and return the output. Uses intelligent completion detection (prompt matching + idle timeout). In safe mode, dangerous/interactive commands are blocked. Long-running commands automatically transition to async mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| idleMs | No | Idle timeout in ms - if no new output for this duration, consider command done (default 2000) | |
| waitMs | No | Maximum wait time in ms (default 30000). Command may return earlier if prompt detected or idle timeout reached. | |
| command | Yes | Shell command to execute | |
| session | No | Session name or id. Defaults to "default" | |
| maxChars | No | Max chars to read from output (default 16000). When output exceeds this limit, head (30%) and tail (70%) are returned with the middle omitted. |