ssh_interactive_exec
Start remote commands with an interactive terminal to handle sudo prompts, confirmations, and setup wizards, returning output and a session ID for continued interaction.
Instructions
Start a command on the remote host with a PTY allocated, for programs that prompt for input (sudo asking for a password, y/N confirmations, setup wizards, REPLs). Waits until output goes quiet (likely waiting for input) or the process exits, then returns the output so far plus a session_id. If the command finishes without prompting, the session is closed automatically and there is nothing further to do. Otherwise, use ssh_interactive_input to reply or poll, and ssh_interactive_close when finished. Idle sessions auto-expire after 10 minutes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | SSH target in the form user@host[:port]. Uses the local SSH config and keys. | |
| command | Yes | ||
| quiet_ms | No | How long output must be idle before returning. |