Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Jun 2003 01:07:30 -0400
From:      Steve Sapovits <steves06@comcast.net>
To:        Josh Brooks <user@mail.econolodgetulsa.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How do I set up a ssh tunnel between two FreeBSD systems ?
Message-ID:  <20030608010730.000034a9.steves06@comcast.net>
In-Reply-To: <20030607213312.S81042-100000@mail.econolodgetulsa.com>
References:  <20030607213312.S81042-100000@mail.econolodgetulsa.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 07 Jun 2003 21:36:32 -0700 (PDT)
Josh Brooks <user@mail.econolodgetulsa.com> wrote:

> I have read the ssh man page and am not getting the results I think I
> should.  some background:
> 
> serverA is the client
> 
> serverB is running sendmail on port 25
> 
> 
> I want to telnet to serverA on port 34 and get a response from the
> sendmail daemon running on serverB.
> 
> I tried this:
> 
> ssh -L 34:serverB:25 user@serverB
> 
> ^^^ seems to be what the man page instructs me to do ...
> 
> But when I run that command, it asks me for a password, and I log into
> serverB just like any other time I ssh there to log in.

You want to add the -N option: don't execute a remote command
(or login in the absence of one).  I'd also use -f and -n 
(I think -f may imply -n but it doesn't hurt ...).  That will
also put it in background after asking for the password and
make sure output is properly redirected, etc.

Add those options anywhere before the user@serverB piece.

-- 
Steve Sapovits  steves06@comcast.net 



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