1

Machine A is connected to the internet and is behind firewall so it cannot receive incoming connections. Machine B is open to the internet.

I want to be able to type commands into B and have them execute on A. Except it is A that has to reach out to B to establish the connection before B can send it commands.

Can this be done running SSHd on A and plain SSH client on B or do I need a combination of SSHd and SSH client on A (client to establish reverse tunnel pointing to SSHd).

Ploo
  • 11
  • Please search the site before asking. This topic has been covered many times here: http://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work. If there is something specific missing from these Q's then highlight it either on those Q's or point it out in a new Q, referencing the previous ones. – slm Nov 03 '13 at 22:36

1 Answers1

1

If machine A can not be contacted "from the web" then it has to establish the conenction and open a tunnel. Then Machine B can contact Machine A over the tunnel.

http://www.linuxjournal.com/content/ssh-tunneling-poor-techies-vpn see the seciton on reversing the tunnel.

coteyr
  • 4,310