Hi - I have a script currently running on an Amazon Lightsail instance that copies files from 1 remote server ("remote Server 1") to a different remote server ("Remote Server 2") using a simple SCP command. Beyond accessing the files from Remote Server 1 and copying them to a specified location on Remote server 2, I do not have access to either of the remote servers... which is why I'm running the script from the AWS instance. Also, the request to Remote Server 1 must also be coming from a white-listed, dedicated IP otherwise I would just run this script from my home computer.
Requirements have changed and now Remote server 2 needs to be a Dropbox location. I can see in the API documentation that I can copy LOCAL files directly to Dropbox, but I'm wondering if that PATH parameter can specify an SSH connection to another remote server??
So instead of:
curl -X POST https://content.dropboxapi.com/2/files/upload \
--header "Authorization: Bearer " \
--header "Dropbox-API-Arg: {\"path\": \"/Homework/math/Matrices.txt\",\"mode\": \"add\",\"autorename\": true,\"mute\": false,\"strict_conflict\": false}" \
--header "Content-Type: application/octet-stream" \
--data-binary @local_file.txt
it would be something like
curl -X POST https://content.dropboxapi.com/2/files/upload \
--header "Authorization: Bearer " \
--header "Dropbox-API-Arg: {\"path\": \"me@Remote-server_1:/Homework/math/Matrices.txt\",\"mode\": \"add\",\"autorename\": true,\"mute\": false,\"strict_conflict\": false}" \
--header "Content-Type: application/octet-stream" \
--data-binary @local_file.txt
Does anyone know if something like this is possible or would I have to copy the files from Remote Server 1 to the ASW instance and then use the API to move them from the AWS instance to Remote Server 2?