ssh_write_file
Write UTF-8 text directly to a remote file over SSH, creating or overwriting it, with optional append and automatic parent directory creation. Avoids local temp file and scp round-trip.
Instructions
Write UTF-8 text content directly to a file on the remote host (creates or overwrites; use append=true to append instead). Avoids the round-trip of writing a local temp file and scp-ing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative path on the remote host. | |
| append | No | Append to the file instead of overwriting it. | |
| target | Yes | SSH target in the form user@host[:port]. Uses the local SSH config and keys. | |
| content | Yes | Text content to write to the remote file. | |
| create_dirs | No | Create the parent directory on the remote host if it does not exist. |