Here is a script to use Net::SCP::Expect module. It's useful if you have to pull data from alot of different machines. I put it in a for loop in bash with the different server names.
#!/usr/bin/perl use Net::SCP::Expect; my $scpe= Net::SCP::Expect->new; $svr = $ARGV[0]; $type = $ARGV[1]; $date = $ARGV[2]; print "$svr "; $scpe->login('root', 'foo'); $scpe->scp("$svr:/var/log/ems/$type.$date.log", "/home/me/logs/$type.$ +svr.$date.log"); print "....done\n";

Replies are listed 'Best First'.
Re: Net::SCP::Expect
by rreck (Initiate) on Jan 16, 2008 at 11:23 UTC
    Can't I do the same thing from the command line if I setup the right keys? the procedure is detailed here and I have used it many times.