execute_script
Run multi-line shell scripts on remote SSH servers for automation, configuration changes, or complex checks. Send script via stdin, choose shell, timeout, and host.
Instructions
Execute a multi-line shell script on the remote SSH server.
Uploads the script via stdin and runs it with the specified shell. Useful for multi-step automation, configuration changes, or complex checks.
Args: script: The full script content (multi-line bash/sh/python script). shell: Shell interpreter to use: "bash", "sh", "python3", etc. (default "bash"). timeout: Maximum seconds to wait (default 120). host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Script output or error details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shell | No | bash | |
| script | Yes | ||
| timeout | No | ||
| host_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |