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).

  • Please search the site before asking. This topic has been covered many times here: unix.stackexchange.com/questions/46235/…. 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 3 '13 at 22:36

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.

| improve this answer | |
  • There's a typo in your answer: "seciton ". – A.L Jan 14 '14 at 13:34

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