-1

I want to do reverse SSH tunneling in Local Network.

Machine_A = 192.168.0.3 running SSH server behind firewall,
Machine_B = 192.168.0.5 is allowed to access SSH server and is behind the firewall. Machine_C = 192.168.0.2 can't connect B or C directly

192.168.0.3 has two users: userB, userC i.e., userB can access 192.168.0.3 but userC can't.

All machines are running LINUX. How can Machine_C achieve SSH connection using reverse SSH ? Do I need to enable Port forwarding in ROUTER?

In Machine_B I have to use: ssh -R 12345:localhost:22 _____? from Machine_C : ssh -p 12345 _______?

0

On Machine_B

ssh -g -L 12345:localhost:22 Machine_A

On Machine_C

ssh -p 12345 Machine_B
  • Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience. – Biplab Aug 28 '18 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.