Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Multiple scp targets?
- Date: Wed, 10 Nov 2010 20:38:05 +0900
- From: Pier Fumagalli <pier@example.com>
- Subject: Re: [tlug] Multiple scp targets?
- References: <4CDA6654.60102@example.com> <871v6tfp5s.fsf@example.com>
On Wed, Nov 10, 2010 at 19:28, Stephen J. Turnbull <stephen@example.com> wrote: > > How about > > #! /bin/sh > seconds=30 # TTL for ssh-agent; season to taste > host=$1; shift > echo "Sending $@ to host $host..." > ssh-add -t $seconds ~/.ssh/$host > > # if <target> or <pathN> need to vary by host, use "case $host in ..." > # if <pathN> needs to be specified on the command line, you'll need > # more trickery > for path in path1 path2; do scp $@ ${host}:/target/$path; done > # end script Add "ssh-add -d ...keyfile..." at the end of the script (or in a trap) to make sure the key gets deleted. "man ssh-add" "man bash" / "man trap" Pier
- Follow-Ups:
- Re: [tlug] Multiple scp targets?
- From: Stephen J. Turnbull
- References:
- [tlug] Multiple scp targets?
- From: Darren Cook
- [tlug] Multiple scp targets?
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Multiple scp targets?
- Next by Date: Re: [tlug] Multiple scp targets?
- Previous by thread: [tlug] Multiple scp targets?
- Next by thread: Re: [tlug] Multiple scp targets?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links