Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2001 02:28:15 +1200 (NZST)
From:      Dan Langille <dan@langille.org>
To:        Marc Fonvieille <fonvi@easynet.fr>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: remote cvs access
Message-ID:  <Pine.BSF.4.21.0106300221020.60989-100000@lists.unixathome.org>
In-Reply-To: <20010629154229.A744@vobiscum.styx.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 Jun 2001, Marc Fonvieille wrote:

> On Thu, Jun 28, 2001 at 07:18:21PM -0400, Dan Langille wrote:
> > Here's what finally worked for me:
> > 
> >    ssh -2 -N -f -L 2401:cvs.example.org:2401 localhost
> > 
> > where cvs.example.org is the hostname of the cvs server in question.
> > 
> [...]
> > 
> > The next thing that concerns me is the following output from tcpdump.  
> > Hostnames have been changed:
> > 
> > 19:04:52.140672 host.example.org.1156 > cvs.example.org.cvspserver: . ack 
> > 660 win 17520 (DF)
> > 19:04:52.140907 cvs.example.org.cvspserver > host.example.org.1156: P 
> > 660:697(37) ack 1346 win 17520 (DF)
> > 
> > Why am I seeing traffic on port 2401?
> > 
> > Given what I've read in man ssh, I'm hoping that this traffic across the wire 
> > isn't actually on port 2401 and is encapsulated within the ssh connection:
> > 
> >      -L port:host:hostport
> >              Specifies that the given port on the local (client) host is to be
> >              forwarded to the given host and port on the remote side.  This
> >              works by allocating a socket to listen to port on the local side,
> >              and whenever a connection is made to this port, the connection is
> >              forwarded over the secure channel, and a connection is made to
> >              host port hostport from the remote machine.
> >
> 
> Well, for me your ssh command is weird:
> 
> ssh -2 -N -f -L 2401:cvs.example.org:2401 localhost
> 
> this line create a secure channel from localhost to localhost and the
> forwarding is made over this tunnel: it's what i understand...
> 
> Try ssh -2 -N -f -L 2401:cvs.example.org:2401 cvs.example.org
> (i guess you own a ssh acces on that box).

Yes, I do:

[dan@dev:~] $ ssh -p 2222 -2 -N -f -L 2401:cvs.freshports.org:2401
cvs.freshports.org
dan@cvs.freshports.org's password:
[dan@dev:~] $ cvs login
(Logging in to dan@localhost)
CVS password:
channel_open_failure: 3: reason 1: bla bla
cvs [login aborted]: recv() from server localhost: EOF

As you can see, I'm sshing to port 2222 because the cvs server is actually
behind a NAT firewall.  For what it's worth, I did try a port forward
on the firewall for 2401 but that failed for other reasons:

$ ssh -2 -N -f -L 2401:cvs.example.org:2401 cvs.example.org
dan@cvs.example.org's password:
[dan@dev:~] $ cvs login
(Logging in to dan@localhost)
CVS password:
cvs login: authorization failed: server localhost rejected access to
/usr/local/cvs for user dan
[dan@dev:~] $ Connection to cvs.example.org closed by remote host.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106300221020.60989-100000>