ssh_file_write
Write, overwrite, or append content to files on remote servers via SSH. Supports sudo, file permissions, and automatic parent directory creation.
Instructions
Create a new file or overwrite/append to an existing file with specified content. Handles special characters and multi-line content properly.
Returns: Dictionary with operation status and details
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the file to write to | |
| content | Yes | Content to write to the file | |
| append | No | Whether to append to the file instead of overwriting | |
| use_sudo | No | Use sudo for the operation | |
| mode | No | File permissions to set after writing (octal, e.g. 0o644) | |
| create_dirs | No | Create parent directories if they don't exist |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||