I completed the remote copy task successfully but I think I could have done it better, here’s what I did:
I used scp to copy the file to the home directory of the user on the remote server,; I then ssh’d to the remote server and copied the file from the home directory to the directory specified in the question.
I couldn’t scp the file directly to the specified directory as I kept receiving permission denied, even after chmod-ing and chown-ing the remote directory. I used the command:
scp < local file name > < remote user >@< remote server >:/remote/directory
Any thoughts on what I could have done better or if anyone wants to share their method it would be greatly appreciated.