Search code examples
linuxnetwork-programmingfile-transfer

How can I send data or file from Linux to Linux machines?


This question is very weird (I'm very beginner). I want send data from Linux to Linux. For example, I have Linux server (RPI3, called 'a'), and another server called 'b'. So I want data(format : python, c, jpg, txt, ...etc) from 'a' to 'b'

What are methods do I use? Here is what I know.

  1. using socket
  2. using MQTT

I want know above 2 methods are available??

And another methods!!


Solution

  • To send files from a to b, you can use scp protocol. a and b have to be in the same network. scp sourcedirectory/image.jpg username@IPaddressOfTheDestination:targetdirectory/

    There are obviously another way to send file like the protocol ftp.