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 &
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
Received on 04/21/08
This archive was generated by hypermail 2.2.0 : 12/19/08 EST