Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 2004 00:43:13 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Mark Ovens <marko@freebsd.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Quick and simple ssh(1) question
Message-ID:  <20040913224313.GA78678@falcon.midgard.homeip.net>
In-Reply-To: <41460E03.8020408@freebsd.org>
References:  <41460E03.8020408@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 13, 2004 at 10:15:47PM +0100, Mark Ovens wrote:
> Is it correct that you can't ssh(1) between two machines on the same LAN 
> (using NAT) _via the Internet?_

What do you mean 'via the Internet'?  If both machines are on the same
LAN any connections between them will never go outside the LAN, and
thus never go near the Internet.

> 
> Strange question I know, but I need to be able to access one of my 
> machines, postie, remotely. I've got sshd(8) running and can ssh(1) to 
> it from a local machine using it's local hostname. However, since I only 
> have a single 'net connection here I tried to test connecting remotely 
> by ssh(1)'ing to my router's 'net-facing hostname but I get
> 
>   ssh: connect to host <router_hostname> port 22: Connection refused
> 
> Port 22 is forwarded to postie on the router.

Most likely your router is configured to only forward connections that
come from the outside.

Does it work to access 'postie' via ssh from some machine that is
*actually* on the outside?  If it does, then it is the configuration of
your router which is not doing what you want it to.


> 
> It kind of make sense to me that this won't work but I'd like to confirm 
> that this is the case and it's not my sshd(8) configuration that's wrong.

I doubt it is sshd(8) that is at fault.  Most likely it is your
configuration of NAT and/or the forwarding of the port which is to
blame.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040913224313.GA78678>