I have the following scenario:
- A service listening on port 6678 on Computer C
- Only computer B can access computer C via ssh
- Computer B is accessible globally
I would like to do the following:
Setup a service on a Computer "A" that listens on port 6678 that would end up being redirected to computer "C" and to its listening service. I understand that I need to create an SSH tunnel through multiple hops. Such as A -> B -> C.
This question helped me a lot, but the problem is: It does not set a socket on "A" that may be accessed globally. I tried to mess around with ssh -D to set a binding socket, e.g.
ssh -D *:6678 -p 6678 localhost
but it does not seem to do a trick.
What would be the best option for creating a multiple-hop SSH tunnel and at the same time setup a listener on computer "A" to allow traffic to?