HTTP Server behind remote ssh tunnel on windows = π₯
I want to run a local web server on my windows machine and this needs to accesible by the remote computer.
I need this because the local server needs to open a local app on the windows machine when a certain endpoint is hit.
So I have a simple flask application that runs locally, however for the scope of today TIL that is not even relevant. What matters is that I need to access to local windows server from a remote computer.
Assuming the server is running on localhost:5000 and I want to access it from the remote server.
This is the idea:
- setup a reverse ssh tunnel from the windows machine to the remote server (
ssh -R 5000:localhost:5000 remote-server) - access the local server from the remote server (
curl http://localhost:5000)
This setup works on linux but canβt make it work on Windows.
If I login on the remote server and run curl http://localhost:5000 I get the response from the local server: curl: (52) Empty reply from server
I am quite sure this is a windows issue because I have remove all other possible sources of errors, but I canβt figure out what is the root cause.