Using Wget
In machine A, Start a web server.
python -m http.server
# We can specify which directory to host by `--directory` option.
python -m http.server --directory /usr/bin
In machine B, download a file from the web server of machine A.
wget http://<ip-for-machine-A>:8000/example.txt
# Download recursively
# -r: recursive
# -np: no parent
# Don't forget "/" after the directory name
wget -r -np http://<ip-for-machine-A>/somedir/
Using Netcat
Transfer a File
In machine A, start a listener for receiving a file.
In machine B, send a file to machine A.
Transfer a Directory
In machine A, start a listener for receiving a directory.
In machine B, compress a directory using tar
and transfer it.
In machine A, decompress the tar file and get the directory.
Using Base64
In machine A, encode a file with base64
and copy the encoded Base64 string.
In machine B, paste the encoded Base64 string.