Write a file to the remote server
write_fileWrites text content to a remote file via SFTP for deploying configs, env files, or scripts on any server.
Instructions
Writes text content to a file path on the remote server via SFTP. Useful for config files, env files, or scripts that don't fit one of the deploy_* recipes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Server IP address or hostname, e.g. 168.119.45.12 | |
| port | No | SSH port, defaults to 22 | |
| content | Yes | File content to write | |
| username | Yes | SSH username, e.g. root or deploy | |
| passphrase | No | Passphrase for the private key, if it has one | |
| remotePath | Yes | Absolute or ~-relative path on the remote server | |
| privateKeyPath | Yes | Path to the private key on THIS machine, e.g. "~/.ssh/id_ed25519" |