I have a raspberry pi operating 24/7 in a different location and I have a C# script running on my laptop. I want to transfer a file from my computer to the raspberry pi over the internet using this script. The raspberry pi and my laptop are NOT on the same local network, but both have access to internet. What is the best way to transfer the file? Can someone point me in the right direction?
The file is a text file which would be a few kilobytes long.
Run a FTP server on the RPI, and port foward the router's respective ports to the RPI.
Alternatively SSH and port foward the router's respective ports to the RPI, then use SFTP.
disclaimer, you are exposing your PI to the internet