SSH access to machine behind router

Joseph E. Sacco, Ph.D. joseph_sacco at comcast.net
Mon Feb 28 13:57:10 MST 2005


The short answer is "yes". In fact you do this all the time when you
access servers at larger sites.

The sightly longer answer is there needs to be an allowed "path" from
wherever you are to the router, through the router, and to the machine
in question. 

Seen from the "outside", the router is the gateway to your 192.168.0.x
class C network. That means your outside machine must be configured to
know that that router is the gateway to the 192.168.0.x network.

The router must be configured to allow you to pass SSH stuff through.
Modern routers can be configured to not only allow or reject SSH traffic
in general, but can be configured to allow or reject based on
either/both the source or destination IP address.

Clint,  welcome to the work of IP route tables.


-Joseph

=================================================================================

On Mon, 2005-02-28 at 15:38, Clinton MacDonald wrote:
> Friends:
> 
> Can I SSH to a machine that is "behind" a router?
> 
> At home I have several machines (YDL, Linux, and Mac OS X) that get 
> their IP addresses from a wireless router. The "external" IP address (of 
> the router itself?) is something like "66.xxx.xxx.123". Each computer on 
> my mini-network then receives a "local" IP address from the router: 
> 192.168.0.1, 192.168.0.2, etc. In setting up the router, I made sure to 
> leave port 22 open (I think :-) ).
> 
> If I know the IP address of the router, is there any way to use ssh to 
> access one of the individual machines (say, 192.168.0.2)? Would it be 
> anything like "ssh clint at 192.168.0.2@66.xxx.xxx.123"?
> 
> Thanks!
> 
> Best wishes,
> Clint
-- 
joseph_sacco[at]comcast[dot]net



More information about the yellowdog-general mailing list