blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:
Check out this sniglet of code:
I realize that debug is a bogus parameter but the code is failing with a timeout at the scp line after about 10 seconds. (or less)foreach my $host (@hosts) { my $scpe = Net::SCP::Expect->new( host => $host, # user => $user, # password => $password, compress => 1, auto_yes => 1, no_check => 1, debug=>1, timeout => 120 ); $scpe->login($user,$password); printf "Copying files to %s:\n", $host; foreach my $file (@files) { printf "\t%s....", $file; my $remote=sprintf("%s\@%s:/tmp",$user,$host); printf "%s..",$remote; $scpe->scp( $file, $remote); printf "\r"; } }
Is there a way around this issue? Should I abandon Net::SCP::Expect? Any thoughts?
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::SCP::Expect appears to ignore Timeout value
by kschwab (Vicar) on Mar 21, 2013 at 15:32 UTC | |
by blue_cowdawg (Monsignor) on Mar 21, 2013 at 19:25 UTC | |
by kschwab (Vicar) on Mar 21, 2013 at 19:44 UTC | |
by blue_cowdawg (Monsignor) on Mar 25, 2013 at 15:35 UTC |
Back to
Seekers of Perl Wisdom