Only submit 5 user at once because stdin and stdout buffers in net::ssh::perl are too small

This commit is contained in:
katagia 2003-11-15 11:37:15 +00:00
parent 885ef93eaf
commit 87751f5bb9
1 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ else {
while (defined($input = <STDIN>)) {
$string[$i] .= $input;
$j++;
if ($j==30) {
if ($j==5) {
$j=0;
$i++;
}
@ -211,8 +211,8 @@ else {
}
else { $argv = "*test\n"; }
my $ssh = Net::SSH::Perl->new($hostname, options=>[
"UserKnownHostsFile /dev/null"
]);
"UserKnownHostsFile /dev/null"],
protocol => "2,1" );
$ssh->login($username[0], $password);
foreach $string2 ( @string ) {
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2);