How do I set up a ssh tunnel between two FreeBSD systems ?
steves06 at comcast.net
Sat Jun 7 22:11:35 PDT 2003
On Sat, 07 Jun 2003 21:36:32 -0700 (PDT)
Josh Brooks <user at 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 at 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 at serverB piece.
Steve Sapovits steves06 at comcast.net
More information about the freebsd-questions