ssh_write_file
Write or update a remote file over SFTP, with automatic timestamped backup creation before overwriting existing content.
Instructions
Create or update a remote file over SFTP. By default automatically creates a timestamped backup copy (.bak-...) of any existing file before overwriting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Optional file permissions mode in octal notation, e.g. "0644" or "0755". | |
| path | Yes | The remote absolute path where the file should be written. | |
| backup | No | Whether to create a timestamped backup before writing if file exists (default: true). | |
| content | Yes | The string content to write into the file. | |
| serverId | Yes | The ID of the configured target server. |