in reply to SSH and qx

Hello cbeckley,

What version of Perl is the legacy OS is running?

Maybe we can find an old ssh module on cpan, pre installed.

You can check through cpan terminal if a module is installed like this:

cpan[1]> m Net::SSH Reading '/home/user/.cpan/Metadata' Database was generated on Mon, 13 Mar 2017 14:17:02 GMT Module id = Net::SSH CPAN_USERID IVAN (Ivan Kohler <ivan-pause@420.am>) CPAN_VERSION 0.09 CPAN_FILE I/IV/IVAN/Net-SSH-0.09.tar.gz UPLOAD_DATE 2008-05-14 MANPAGE Net::SSH - Perl extension for secure shell INST_FILE /home/user/perl5/lib/perl5/Net/SSH.pm INST_VERSION 0.09 cpan[2]> m Net::SSH::Perl Module id = Net::SSH::Perl CPAN_USERID SCHWIGON (Steffen Schwigon <schwigon@cpan.org>) CPAN_VERSION 2.09 CPAN_FILE S/SC/SCHWIGON/Net-SSH-Perl-2.09.tar.gz INST_FILE (not installed)

Hope this helps.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: SSH and qx
by cbeckley (Curate) on Mar 13, 2017 at 16:23 UTC

    Thanks for taking the time to look at this.

    The version of Perl running is v5.12.3. Neither Net::SSH nor NET::OpenSSH, which is what I use elsewhere, are installed. v5.12.3 is good in that it opens some of the options that you and haukex have mentioned. This is the last machine of it's ilk in the environment and due to a number of reasons its retirement keeps getting postponed, and while I'm attempting to work through the resistance facing the installation of even local copies of Perl modules, unless I get permission to install new modules I'm stuck with what's currently installed.

    Thanks,
    cbeckley

      Net::OpenSSH is a pure Perl module. You just have to copy everything in the lib directory from the module distribution into some directory in the machine and add that directory into @INC to get it working.

      The only possible issue would be that the available ssh could be too old. If that is the case, you can also try Net::SSH::Any, that will happily work with older versions of ssh using the Ssh_Cmd backend.

      Net::SSH::Any is also a pure Perl module that you can install in the same way, just copying the contents of its lib directory.

        Wonderful! That worked like a charm! Thank you so much!

        Now I have these even older boxes where perl -v returns 5.004_04 ... :-p

        Thanks,
        cbeckley