Re: [Nolug] multiple SSH sessions at once

From: Scott Harney <scotth_at_scottharney.com>
Date: Mon, 21 Apr 2008 12:02:09 -0500
Message-ID: <5a8409c40804211002v203e5ddne8a4c1716ca9437@mail.gmail.com>

final concur, screen is what you want.

To control multiple things at once, tentakel (google it) may be useful to
you as well.

On Mon, Apr 21, 2008 at 11:48 AM, B. Estrade <estrabd@gmail.com> wrote:

> On Mon, Apr 21, 2008 at 11:38:16AM -0500, Charles Paul wrote:
> > If you just need a tunnel (ie, not a shell) - use the -N option for SSH.
> >
> > #!/bin/sh
> > # connectssh-1.sh
> > while [1];
> > do ssh -N -L ???:xxx.xxx.xxx.xxx:??? foo@shell.remote-host.org;
> > sleep 10;
> > done
> >
> >
> > How you run these scripts is up to you-- a simple way would be to
> > create these ssh tunnelling scripts and run them from another script:
> >
> > #!/bin/sh
> > connectssh-1.sh &
> > connectssh-2.sh &
> > connectssh-3.sh &
> > connectssh-4.sh &
>
> Through the ~/.screenrc file, one may specify how many 'screens' to open
> when the application is started; this includes an opening command to
> execute.
>
> I usually don't cheerlead particular utilities, but screen has become one
> of my most used tools.
>
> A bigger selling point is that it facilitates persistent terminal
> sessions; in otherwords, you can detach and reattach to screen session, so
> you never really have to close any thing you're doing. I works *really*
> well if you do things on multiple remote hosts.
>
> You'll never have to stop a compile or log off of irc again if you have a
> screen session going on a trusted box somewhere (aka, bounce box) - when
> it's time to go home, you detach. Later when you want to work on things
> again, login to your bounce box and reattach to the session. It'll be as if
> you never left.
>
> If you need a sample ~/.screenrc, let me know off-list.
>
> Brett
>
> >
> >
> > On Mon, Apr 21, 2008 at 11:22 AM, Petri Laihonen <pietu@weblizards.net>
> wrote:
> > > Does anyone know a method of starting multiple SSH sessions at once?
> > >
> > > Background:
> > > When I start working, first I have to establish 3-4 SSH connections
> > > with tunneling various ports from local to few remote servers.
> Currently
> > > I just open 3-4 tabs to console and manually establish the
> connections.
> > > (forwardings are set in the .ssh/config file already for each), then
> > > just minimize the console.
> > >
> > > What I'm looking for is to establish the above via only one command,
> or
> > > mouse click.
> > >
> > >
> > > Petri
> > >
> > > ___________________
> > > Nolug mailing list
> > > nolug@nolug.org
> > >
> > ___________________
> > Nolug mailing list
> > nolug@nolug.org
> ___________________
> Nolug mailing list
> nolug@nolug.org
>

___________________
Nolug mailing list
nolug@nolug.org
Received on 04/21/08

This archive was generated by hypermail 2.2.0 : 12/19/08 EST