Sending Files Over the Internet with Python’s http.server and Ngrok: A File Transfer Hack for Restricted Environments
<p>In many work environments, transferring files to a remote server isn’t as straightforward as it sounds. You may have to go through intermediary servers — often referred to as jump servers or bastion hosts — as a part of the organization’s security protocol. In such a setup, the traditional approach would involve first copying the file to the jump server and then moving it to the destination server. However, this method can be cumbersome, slow, and may even raise security concerns.</p>
<p>Faced with this challenge, I needed to find a way to bypass the additional step of copying files onto the jump server. That’s where Python’s <code><a href="https://docs.python.org/3/library/http.server.html" rel="noopener ugc nofollow" target="_blank">http.server</a></code> and <a href="https://ngrok.com/" rel="noopener ugc nofollow" target="_blank">Ngrok</a> come into play. These tools enabled me to set up a temporary, secure, and direct file server on my local machine that could be accessed from the destination server. This blog post will walk you through how to set up this quick 'hack' for transferring files from your local machine to a remote server, effectively skipping the jump server.</p>
<p><a href="https://medium.com/@jonathan.hoffman91/sending-files-over-the-internet-with-pythons-http-server-14d5446f29b4"><strong>Website</strong></a></p>