Take the 2-minute tour ×

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer


