Quick File Transfer

Stand up a throwaway HTTP server in a directory on the sending machine, then pull the file from the receiving machine.

On the sending machine:

cd DirWithFile
python3 -m http.server PORTNUM

On the receiving machine:

wget http://sending.machine.ip.addr:PORTNUM/file -O file

The original note used Python 2’s python -m SimpleHTTPServer; on Python 3 the module is http.server.

Other ways to move a file

  • Over a raw TCP connection with netcat — see Netcat.
  • Over SSH with scp — see SCP.