Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2000 20:53:22 +0200
From:      Gerhard Sittig <Gerhard.Sittig@gmx.net>
To:        freebsd-security@FreeBSD.ORG
Subject:   Re: using mysql over ssh
Message-ID:  <20000420205322.B18618@speedy.gsinet>
In-Reply-To: <38FEDD00.6AF2E2FB@algroup.co.uk>; from adam@algroup.co.uk on Thu, Apr 20, 2000 at 11:33:36AM %2B0100
References:  <200004191926.HAA25058@ducky.nz.freebsd.org> <38FEDD00.6AF2E2FB@algroup.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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