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


in reply to Capturing SSH output in an array.

There was a silly bug on Net::SSH::Any breaking password authentication. It is now corrected on version 0.02 that I have just uploaded to CPAN.
use Net::SSH::Any; my $ssh = Net::SSH::Any->new($host, user => $user, password => $passwo +rd); my @out = $ssh->capture($cmd);