[CentOS] Multiple FreeNX servers and SSH ports

Simon Billis simon at houxou.com
Sun Mar 21 17:06:28 UTC 2010

Hi Nikki,

Niki Kovacs sent a missive on 2010-03-21:

> Les Mikesell a écrit :
>> You don't really need to change the ports on the hosts.  Just configure
>> the router to accept different ports on the internet side and redirect
>> to port 22 at the different IP addresses on the inside. Then you only
>> have to change the client settings for access from outside.   I'd move
>> both of them away from port 22 on the outside, though - you'll avoid a
>> lot of password guessing attempts that will happen otherwise.
> Sorry, but I don't quite follow you. (One of these cases where I feel
> my IQ is just a bit insufficient :oD)
> How can I possibly access two distinct machines behind one single IP
> address when they run SSH on the same port ?

You have to use a combination of NAT and PAT (NAT is Network address
translation and PAT is Port address translation) on the router.

> Or, I'll reformulate my question more simply.
> I have a router with *one* public IP address ( And
> behind that router, on the local network, I have two different machines:
> and
> Is there a (normal, orthodox) way to SSH into these machines directly
> from the outside? That is, without logging into the main box and then
> hopping around internally? Something where in one case, ssh
> -option gets me into machine A, and then ssh
> -otheroption gets me into machine B.
> I'm confused.

Depending on your router you will be able to configure it to do what you

On your router you "should" be able to do the following:
Redirect connections to port 2222 to port 22 AND
Redirect connections to port 2223 to port 22

You then can connect using your favourite ssh client (mine is absolute
telnet :-) ) by connecting to port 2222 you'll be connected
to via ssh.


Hope this helps


More information about the CentOS mailing list