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:00:50 +0900
- From: Romeo Theriault <romeo.theriault@example.com>
- Subject: Re: [tlug] Multiple scp targets?
- References: <4CDA6654.60102@example.com>
Any suggestions? Is there scp syntax to support this? Or a way to
remember the password? (but securely!)While, like Stephen suggested, using key's with timeouts is probably a better idea you could always use a little perl/expect foo.
#!/usr/bin/perl -wuse strict;use Net::SCP::Expect;use Term::ReadKey;ReadMode('noecho');my @dirs = ("/tmp", "/home/romeo");print "Enter password: ";my $password = ReadLine(0);for my $i (@dirs) {my $scpe = Net::SCP::Expect->new;$scpe->login("romeo", "$password");$scpe->scp('/tmp/testfile', "melon:${i}");}ReadMode 0;
--
Romeo Theriault
- Follow-Ups:
- Re: [tlug] Multiple scp targets?
- From: Romeo Theriault
- References:
- [tlug] Multiple scp targets?
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [announcement] 2010-11-13 Technical meeting.
- Next by Date: Re: [tlug] Multiple scp targets?
- Previous by thread: Re: [tlug] Multiple scp targets?
- Next by thread: Re: [tlug] Multiple scp targets?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links