This setup allows you to open a reverse SSH tunnel to an external machine and then be able to use the AWS Workspace machine as a jump host for any network access by starting a SOCKS5 proxy.
- Make sure you have Cygwin installed on the AWS Workspace machine.
- Download microsocks.exe as raw file to the AWS Workspace machine.
- Copy the
tunnel.sh
script - put it in the same folder asmicrosocks.exe
on the AWS Workspace machine (best copy both to your Cygwin home directory). - Create an account with ngrok and add a payment method (no subscription required!).
- Start ngrok on your local machine to allow access to sshd:
ngrok tcp --region us 22
- Take note of the ngrok host and port.
- Start
tunnel.sh
on the AWS Workspace machine, for example:./tunnel.sh 5.tcp.ngrok.io 17654
- You can then make use of the SOCKS proxy on your local machine on port 9041.
In order to use the proxy with git, you can set it up as follows for a repository:
git config http.proxy=socks5h://localhost:9041
For initial clone use -c
:
git -c http.proxy=socks5h://localhost:9041 clone https://some.internal.domain/repo.git