Reputation: 85
I am develping using VS code SSH remote and I have an app runing on my remote machine on localhost.
When I try to access the app from my local machine, I cannot reach it from the IP address of the remote machine. Instead, I can access it on localhost on my LOCAL machine.
This doesn't quite make sense to me.
Any idea why this is the case? Is VS Code doing some magic here? If so, how to disable this?
Upvotes: 4
Views: 4911
Reputation: 352
Thats because Visual Studio Code Remote - SSH extension does port forwarding behind the scene.
Upvotes: 0
Reputation: 230
If you are using the Visual Studio Code Remote - SSH extension, then yes. That "magic" is called port forwarding/SSH tunnelling. You can check currently forwarded ports in the Ports view. More info here: Forwarding a port / creating SSH tunnel.
Upvotes: 3