in reply to Re^2: Changing a script from Net::Telnet to Net::SSH2
in thread Changing a script from Net::Telnet to Net::SSH2

On Solaris you have to ensure that the OpenSSH client is installed. The one from SUNOracle is an old fork of the OpenSSH one that does not provide some features required by Net::OpenSSH.

Then, you will have to tell Net::OpenSSH where to find it. For instance:

my $ssh = Net::OpenSSH->new($host, ssh_cmd => '/opt/OpenSSH/bin/ssh');