ssh_shell_exec
Send a command to an existing SSH session and capture its output, integrating write, delay, and read operations into a single call for streamlined remote management.
Instructions
Send a command to an SSH shell session and wait for the output. Combines write + delay + read in one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Buffer clear flag: 1 (default) = clear buffer before collecting, 0 = append to buffer | |
| delay | No | Minimum polling duration in milliseconds (default: 1000), kept for backward compat | |
| command | Yes | The command to send to the shell | |
| session_id | Yes | The session ID returned by ssh_shell_open | |
| maxDuration | No | Override execution duration in ms. Default varies by command type: resident commands (ping/logcat/top/...) 10000 (sampling, Ctrl+C sent on timeout), normal commands 300000 (5min fallback, no interrupt sent). Action on timeout still follows resident classification regardless of this value. |