Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 to connect via ssh(from remote machine) to a machine which is having private IP.(say

I have connected via a wireless router(NETGEAR). Also there are 10 peoples sharing the same wireless router.

My cisco modem is providing only one public IP.

My aim is to get a new public IP to my machine without disturbing the other connections , or connect/enable through the ssh service from a remote machine. I heard some 'nat' feature is there to provide this

can i get your ideas too?

share|improve this question

The router that the private ssh connection connects to needs to be setup to port forward a port to your private server on port 22, the source port does not strictly have to be port 22 on the public side, and you dont actually need an extra public IP

to connect to this server you would then connect to ssh using the public IP of the internet connection the server is connected to, if you had to use a non standard ssh port for the public side of the internet connection then you will have to specify the port in your ssh program, for Linux this would be

ssh -p <customport> <user>@<publicIP>
share|improve this answer

Another way would be to use reverse SSH tunnel

share|improve this answer
+1. reverse ssh to another server that is globally reachable and will act as some kind of "proxy". – petrus Mar 6 '11 at 22:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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