From owner-freebsd-security Thu Apr 20 12:20:43 2000 Delivered-To: freebsd-security@freebsd.org Received: from mail3.gmx.net (mail.gmx.net [194.221.183.63]) by hub.freebsd.org (Postfix) with SMTP id 7973B37B88F for ; Thu, 20 Apr 2000 12:20:34 -0700 (PDT) (envelope-from Gerhard.Sittig@gmx.net) Received: (qmail 11796 invoked by uid 0); 20 Apr 2000 19:20:30 -0000 Received: from p3e9e7909.dip.t-dialin.net (HELO speedy.gsinet) (62.158.121.9) by mail.gmx.net with SMTP; 20 Apr 2000 19:20:30 -0000 Received: (from sittig@localhost) by speedy.gsinet (8.8.8/8.8.8) id UAA20538 for freebsd-security@FreeBSD.ORG; Thu, 20 Apr 2000 20:53:22 +0200 Date: Thu, 20 Apr 2000 20:53:22 +0200 From: Gerhard Sittig To: freebsd-security@FreeBSD.ORG Subject: Re: using mysql over ssh Message-ID: <20000420205322.B18618@speedy.gsinet> Mail-Followup-To: freebsd-security@FreeBSD.ORG References: <200004191926.HAA25058@ducky.nz.freebsd.org> <38FEDD00.6AF2E2FB@algroup.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <38FEDD00.6AF2E2FB@algroup.co.uk>; from adam@algroup.co.uk on Thu, Apr 20, 2000 at 11:33:36AM +0100 Organization: System Defenestrators Inc. Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, Apr 20, 2000 at 11:33 +0100, Adam Laurie wrote: > Dan Langille wrote: > > > > > > Open two terminal windows... > > > > > > In window one, do: > > > > > > ssh -L 3306:localhost:3306 user@mydomain.org > > > > > > In window two, do: > > > > > > mysql -h localhost -u userid -p dbname < mysql.sql > > > > > > [ ... ] > > > > What is the point of two windows? > > The first one gives you an ssh tunnel. The second one uses the > tunnel. That's the moment when you sometimes see constructions like these: ssh -L ... user@host sleep 10 & do something [ $MAYBE ] && kill $! I remember some fetchmail docs saying so: Do a sleep 10 or something to keep up the ssh connection for the time needed to establish the tunnelled connection. AFAIK the ssh connection will last until the tunnel is freed, too. Even if the actual command finished sooner. virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message