From owner-freebsd-questions@FreeBSD.ORG Sat Jun 7 22:11:34 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B967137B401 for ; Sat, 7 Jun 2003 22:11:34 -0700 (PDT) Received: from smtp-out.comcast.net (smtp-out.comcast.net [24.153.64.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24D9C43F85 for ; Sat, 7 Jun 2003 22:11:34 -0700 (PDT) (envelope-from steves06@comcast.net) Received: from goldbug.sapovits.org (pcp02671656pcs.norstn01.pa.comcast.net [68.85.23.211]) by mtaout02.icomcast.net (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with SMTP id <0HG5006ASD0R2H@mtaout02.icomcast.net> for freebsd-questions@freebsd.org; Sun, 08 Jun 2003 01:10:04 -0400 (EDT) Date: Sun, 08 Jun 2003 01:07:30 -0400 From: Steve Sapovits In-reply-to: <20030607213312.S81042-100000@mail.econolodgetulsa.com> To: Josh Brooks Message-id: <20030608010730.000034a9.steves06@comcast.net> MIME-version: 1.0 X-Mailer: Sylpheed version 0.8.11claws166 (GTK+ 1.3.0; Win32) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20030607213312.S81042-100000@mail.econolodgetulsa.com> cc: freebsd-questions@freebsd.org Subject: Re: How do I set up a ssh tunnel between two FreeBSD systems ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2003 05:11:35 -0000 On Sat, 07 Jun 2003 21:36:32 -0700 (PDT) Josh Brooks 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