RE: [Ssh-sftp-perl-users] What is the best way to Install Net::SSH::Perl on WinXP
Brought to you by:
dbrobins
From: Bobby J. <bob...@se...> - 2006-03-30 23:33:35
|
>You may need to add an entry in your services file... >%System Dir%\{WINDOWS|WINNT}\system32\drivers\etc >ssh 22/tcp #SSH. control I have added the above to my services file. I can now go one step further than before. But I get a new error: Can't locate Math/GMP.pm in @INC (@INC contains: s:\ctam\qa-tests\lib C:/Perl/li b C:/Perl/site/lib .) at C:/Perl/site/lib/Net/SSH/Perl/Util/SSH1MP.pm line 7, <G EN0> line 1. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/Util/SSH1MP.p m line 7, <GEN0> line 1. Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl/Util.pm line 56, <GEN0> line 1. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/Key/RSA1.pm l ine 6, <GEN0> line 1. Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl/SSH1.pm line 13, <GEN0> line 1. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/SSH1.pm line 13, <GEN0> line 1. Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl.pm line 55, <GEN0 > line 1. There were 2 Failures in Test Case memtest.pl I am unable to install Math::GMP using PPM (install Math-GMP). I get the error: Error: Failed to download URL http://www.soulcage.net/ppds.58/Math-GMP.ppd: 404 Not Found >I get the following error, if I run the scripts in Windows: >Can't map service name 'ssh' to port number at memtest.pl line 8. >#!/usr/bin/perl >use strict; >use Net::SSH::w32Perl; >my $user =3D "root"; >my $pass =3D "password"; >my $host =3D "192.168.0.173"; >my $cmd =3D "cat /proc/meminfo | grep MemFree"; my $ssh =3D Net::SSH::Perl->new($host); $ssh->login($user, $pass); for (1..1000) { > my ($stdout, $stderr, $exit) =3D $ssh->cmd($cmd); > my @temp =3D split /\s+/, $stdout; > my $FreeMem =3D $temp[1]; > Print "Current Free memory is: $FreeMem" if ($FreeMem > 10000); > print "Free memory has dropped below 10K:$FreeMem" if ($FreeMem < 10000); > if ($FreeMem < 2000) > { > print "Critical Error. Free Mem is: FreeMem"; > last; > } > sleep 600; >} |