Hi there!
There are a couple of marketplace modules available in Mendix that have out of the box components available which allow you to do this. A notable module is the SFTP module from MxLabs: https://marketplace.mendix.com/link/component/107256, but this requires you to have sftp set up on your server.
Follow the steps in the documentation to set up this module. Afterwards you can use the following actions in microflows:
If this does not fit your needs, you will need to write custom code for this. As a side note, you will not be able to use a rest call to connect to a server, as it requires a different protocol (SSH).
Good luck!