in reply to Changing a script from Net::Telnet to Net::SSH2

Net::Telnet can be made to work on top of Net::OpenSSH easily. It is explained in the module documentation. Though, note that Net::OpenSSH only works on Linux/UNIX systems.
  • Comment on Re: Changing a script from Net::Telnet to Net::SSH2

Replies are listed 'Best First'.
Re^2: Changing a script from Net::Telnet to Net::SSH2
by jtzako (Sexton) on Mar 04, 2016 at 17:43 UTC
    I may try that if I can get it to install. I'm using a rather cranky Solaris 10 server and havent had much luck getting anything new to install on it.
      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');