Linux Engineer. Aspiring developer. Prone to shenanigans and hacking other people's things. I own too many guitars. Linkedin: https://www.linkedin.com/in/mariusdebeer/
Python Tip:
Copying Files Between Servers Using Python’s Built-In HTTP Server
- Browse to the folder where the file(s) is/are located.
- Run this: python3 -m http.server 8000
(Where 8000 is an open port that's not in use. Use whatever is available.)
- On the server that needs the file, run: wget http://<source_server_ip>:8000/<filename>
or using curl:
curl -O http://<source_server_ip>:8000/<filename>
- Once the file transfer is complete, stop the server on the source machine by pressing: Ctrl C
Anyone on the same network can access the files while the server is running, so stop it immediately after transfer for security.
This is best used for quick, ad-hoc file transfers between servers in the same network.