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&rsquo;t as straightforward as it sounds. You may have to go through intermediary servers &mdash; often referred to as jump servers or bastion hosts &mdash; as a part of the organization&rsquo;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&rsquo;s where Python&rsquo;s&nbsp;<code><a href="https://docs.python.org/3/library/http.server.html" rel="noopener ugc nofollow" target="_blank">http.server</a></code>&nbsp;and&nbsp;<a href="https://ngrok.com/" rel="noopener ugc nofollow" target="_blank">Ngrok</a>&nbsp;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 &#39;hack&#39; 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>