http://www.perlmonks.org?node_id=1028039


in reply to Re^2: Communication between Windows and Linux via Perl
in thread Communication between Windows and Linux via Perl

I recently implemented something like this with Net::SSH::Any... Here's a code snippet...

my $ssh = Net::SSH::Any->new($ipAddr, user => $user, password => $password, backends => [qw/Net::SSH2/], timeout=>1, kill_ssh_on_timeout=>1); $ssh->error and die "Unable to Connect via SSH to $mac, " . $ssh->error); my ($output, $errput) = $ssh->capture2($cmd);

Replies are listed 'Best First'.
Re^4: Communication between Windows and Linux via Perl
by zhonghua (Novice) on Apr 11, 2013 at 14:18 UTC

    Hi,

    Thank you, I'll try it.

    Br, Wei