0

I have to connect via ssh(from remote machine) to a machine which is having private IP.(say 192.168.1.3)

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?

2 Answers 2

2

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>
1

Another way would be to use reverse SSH tunnel

1
  • +1. reverse ssh to another server that is globally reachable and will act as some kind of "proxy".
    – petrus
    Mar 6, 2011 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .