I have a remote server behind a firewall and a NAT with no external IP address. I want to be able to establish a reverse SSH connection with this server. The issue is getting the remote server to instantiate the reverse SSH connection to my local computer at my command.

Assuming I have superuser privileges on the remote server and that the remote server in its default state has only basic web access, how could I communicate sensibly with the server in order to get it to instantiate a reverse SSH connection?

As an extremely coarse solution, imagine my creating a webpage which is monitored continuously by the remote server and that the webpage is changed in some way to communicate to the remote server to instantiate a reverse SSH connection.

What would be a more sensible approach? Could communications be established via a decentralised system, like BitTorrent?

| |

Get out the bailing wire and duct tape, but this is what I've done in the past

  1. On some web server out there, put a file.
  2. On the server you want to start the connection, have it wget that file in a script run by cron every X minutes or at certain times of day
  3. If the file is not there (or if it is... up to you) then start a screen session sshing out to whatever host and authenticating and establishing your tunnel
| |

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.