saikat has asked for the wisdom of the Perl Monks concerning the following question:

==============================
use Net::SSH::Perl; $conn=Net::SSH::Perl->new("10.94.195.78"); $conn->login("root","gone2far"); print "Login is successful \n"; ($output,$errors,$exit)=$conn->cmd("ls -l"); print $output;
=========================================
C:\perl-program>perl connRemoteHost.pl Can't locate Math/Pari.pm in @INC (@INC contains: C:/Perl/site/lib C:/ +Perl/lib . ) at C:/Perl/lib/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1. BEGIN failed--compilation aborted at C:/Perl/lib/Net/SSH/Perl/Util/SSH +2MP.pm lin e 6, <GEN0> line 1. Compilation failed in require at C:/Perl/lib/Net/SSH/Perl/Util.pm line + 56, <GEN0 > line 1. BEGIN failed--compilation aborted at C:/Perl/lib/Net/SSH/Perl/Kex/DH1. +pm line 10 , <GEN0> line 1. Compilation failed in require at C:/Perl/lib/Net/SSH/Perl/Kex.pm line +6, <GEN0> line 1. BEGIN failed--compilation aborted at C:/Perl/lib/Net/SSH/Perl/Kex.pm l +ine 6, <GE N0> line 1. Compilation failed in require at C:/Perl/lib/Net/SSH/Perl/SSH2.pm line + 6, <GEN0> line 1. BEGIN failed--compilation aborted at C:/Perl/lib/Net/SSH/Perl/SSH2.pm +line 6, <G EN0> line 1. Compilation failed in require at C:/Perl/lib/Net/SSH/Perl.pm line 52, +<GEN0> lin e 1.
==============================================

Install this module in the system ==>Net::SSH::Perl but compilation is failing. Can you please help as not able to compile it?

I tried installing Net::SSH2 but did not help. See the error as given below,

C:\perl-program>perl connRemoteHost.pl Can't locate auto/Net/SSH2/autosplit.ix in @INC (@INC contains: C:/Per +l/site/lib C:/Perl/lib .) at C:/Perl/lib/AutoLoader.pm line 173. at C:/Perl/site/lib/Net/SSH2.pm line 9 Can't locate loadable object for module Net::SSH2 in @INC (@INC contai +ns: C:/Per l/site/lib C:/Perl/lib .) at connRemoteHost.pl line 1 Compilation failed in require at connRemoteHost.pl line 1. BEGIN failed--compilation aborted at connRemoteHost.pl line 1.

Replies are listed 'Best First'.
Re: Issue in remote Host script in Net::SSH::Perl
by szabgab (Priest) on Feb 17, 2012 at 18:59 UTC
    This means you still need to install Math::Pari
      Installation is not working and showing this problem, ========================================== 'C:' is not recognized as an internal or external command, operable program or batch file. dmake.exe: Error code 255, while making 'kernel1.s' dmake.exe: Error code 255, while making 'libPARI\libPARI.a' ILYAZ/modules/Math-Pari-2.01080605.tar.gz C:\Perl\site\bin\dmake.exe -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible C:\perl-program>
Re: Issue in remote Host script in Net::SSH::Perl
by salva (Canon) on Feb 17, 2012 at 22:59 UTC
Re: Issue in remote Host script in Net::SSH::Perl
by Riales (Hermit) on Feb 17, 2012 at 19:26 UTC

    Did you use MCPAN to install Net::SSH::Perl? It should resolve dependencies like this for you:

    perl -MCPAN -e 'install Net::SSH::Perl'
      I tried this and the module was installed properly.But during execution of the script is giving this error.