Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a machine listening for ssh connections within a university network. The way that they've configured the network is such that each building is assigned a single external IP. I have no ability to change network infrastructure. Supposing that I know the current non-static internal IP of the machine that I want to access as well as it's external IP, how can I make the connection from the outside (assuming there is no interference from any sort of firewall)?

share|improve this question

closed as off topic by EEAA, Ward, mdpc, sysadmin1138 Nov 8 '11 at 20:25

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

You have to do one of two things, and they both require a third machine with a public IP address running software you control:

1) Setup a VPN between that machine and some external machine with a public IP. Connect into that VPN and use it to access the machine.

2) Have that machine connect out to a third machine that operates as a proxy. Connect to the third machine, have it and the machine you are connecting to cooperate to attach an outbound connection from that machine to your outbound connection to the third machine and proxy that to an inbound 'loopback' connection to the machine's SSH client.

Here's a more detailed explanation of how method 2 works.

  1. A program running on the machine you wish to SSH into makes an outbound connection to the third machine.

  2. You make an outbound connection to the third machine. You tell it you wish to make a connection to the SSH client on the inside machine.

  3. The third machine tells the inside machine that you wish to make an SSH connection to it. It makes another TCP connection to the third machine.

  4. The third machine tells you that it is ready. You make an SSH connection to the third machine. The third machine proxies the SSH connection to the inside machine's second connection made in step 3.

  5. The inside machine completes the connection and proxies between the connection made in step 4 and a new 'loopback' connection to the SSH server.

  6. You are now talking to the inside machine's SSH server on a connection that appears to be from itself to itself, but actually through two proxies (one on the third machine between its two inbound connections and one on that local machine).

share|improve this answer

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