简体   繁体   中英

C# Transfer file over internet

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM