NAME

MIO::SSH - Run multiple SSH commands in parallel.

SYNOPSIS

use MIO::SSH;

my @node = qw( host1 host2 ... );
my @cmd = qw( uptime );

my $ssh = MIO::SSH->new( map { $_ => \@cmd } @node );
my $result = $ssh->run( max => 32, timeout => 300 );

my $output = $result->{output};
my $error = $result->{error};

METHODS

run( %param )

Run ssh commands in parallel. The following parameters may be defined in %param:

max : ( default 128 ) number of commands in parallel.
timeout : ( default 300 ) number of seconds allotted for each command.
sudo : ( default no sudo ) remote sudo user
user : ( default logname ) connect as user
pass : password