I have a computer A, a server B (Azure VM) and a second computer C. I want to connect from A to C through the server B.
Setup:
A: ssh -i location_of_private_key -L 12000:public_IP_of_B:20000 user@serverB
C: ssh -i location_of_private_key -R 20000:localhost:12000 user@serverB
Testing:
A: nc localhost 12000
C: nc -l 12000
But the first testing command (in A) fails, I can't establish connection to B on port 20000.
What am I missing ?