Upload File
upload_fileUpload a text file to a MikroTik router via SFTP with FTP fallback, overwriting files of the same name. Use dry-run to test connectivity before writing.
Instructions
Upload a text file to a router, overwriting any existing file of the same name. Prefers SFTP (encrypted, over SSH) and falls back to plaintext FTP if SFTP is unavailable. Requires SSH (or FTP) access for the router user. RouterOS runs a file named *.auto.rsc as a script when it arrives over FTP. Dry-run tests connectivity only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Target filename on the router (e.g. flash/my-script.rsc) | |
| dryRun | No | Validate SFTP or FTP connectivity without writing the target file | |
| content | Yes | File content to upload (text) | |
| routerId | No | Router ID; omit to use the default router. | |
| confirmationToken | No | Token from a prior APPROVAL_REQUIRED response. Re-submit the identical call with this token to confirm the destructive action. |