Net-SSH-Perl - Net-SSH-Perl

Posted on Wed May 21 07:25:02 2008 by jkumarl
Net-SSH-Perl
I was executing below perl program to access mu DUT but while i can see some compilation error message. Program: ========
[root@localhost SNMPAUTO]# cat snmp.pl #!/usr/bin/perl use Net::SSH(); my $host = "10.204.64.115"; ### Linux Machine my $telnet = new Net::SSH(Timeout=>10, Errmode=>'die' ); $telnet->open($host); $telnet->login('admin','welcome'); ### username and password to login my @date = $telnet->cmd('show version'); my $d = $date[0]; print date[0];
Error message: ============== [root@localhost SNMPAUTO]# perl ./snmp.pl Can't locate Net/SSH.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./snmp.pl line 2. BEGIN failed--compilation aborted at ./snmp.pl line 2. [root@localhost SNMPAUTO]# so i thought SSH module is not avilable in my machine and i started downloading through CPAN....but it took 5 hours..then it was in hung state....there is no response at all. is there any way to install only SSH module through CPAN? i was trying to install all the modules. Thanks, Jay.
Write a response