My company has a self hosted git server that only accepts connections from within the company's network. In my local machine, while connected to the company's VPN, I can access my git remotes as:
ssh://[email protected]:8022/path/to/repo.git
I would like to be able to connect to this git server from a remote machine that I can SSH into but which is not within the company's network, and thus does not have direct access to the git server. So, while my local machine is within my company's network, I would SSH into the remote server and the remote server would connect to the git server by tunneling the connection though my local machine.
Is this possible? How can I configure SSH to do so?
I've done some searching and found many solutions for the reverse problem or how to access locally a resource that's only accessible to the remote, for example this (Transparent access to remote resource on a private network), but I've not found any solution to my use-case.