in reply to Re^4: Compiling Net::SSH::Perl
in thread Compiling Net::SSH::Perl

Net::OpenSSH is failing because SUN ssh client is in the path before the OpenSSH one. Use the ssh_cmd option to tell the module where to find the right client:
my $ssh = Net::OpenSSH->new($host, ... ssh_cmd => '/opt/openssh/bin/ssh');