ssh_write_session
Write commands or control sequences to an SSH session's PTY. End with newline to press Enter, set wait_seconds to capture output, and drain remaining output via ssh_read_session.
Instructions
Write text or a control sequence to a tracked SSH session PTY. Always terminate commands with a trailing newline (\n) to submit them. Control characters: \u0003 for Ctrl-C, \u0004 for Ctrl-D, \u001a for Ctrl-Z. Use wait_seconds (e.g. 1-5) to receive the command response in the same call. Check 'pending_output_chars' in the response; if non-zero, call ssh_read_session to drain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Raw text to write to the session PTY. Include '\n' to press Enter. Control characters work: '\u0003' for Ctrl-C, '\u0004' for Ctrl-D. Text is written exactly as provided. | |
| session_id | Yes | ||
| wait_seconds | No | Seconds to wait for output after writing. Default: 1.0. | |
| max_output_chars | No |