RE: [Ssh-sftp-perl-users] What is the best way to Install Net::SSH::Perl on WinXP
Brought to you by:
dbrobins
From: Matthew J. S. <vag...@ya...> - 2006-03-30 22:51:33
|
The solution to your problem migh just be as simple as you reviewing your code and doing some reading, but usually it's really really helpfull if you actually post what the error is! Is this module suppose to be equivalent to Net::SSH:Perl READ: http://search.cpan.org/~scotts/Net-SSH-W32Perl-0.05/lib/Net/SSH/W32Perl.pm CPAN is a great resource, use it. Are you sure you want to create the object with: my $ssh = Net::SSH::Perl->new($host); You probably mean: my $ssh = Net::SSH::W32Perl->new($host); --- Bobby Jafari <bob...@se...> wrote: > Hi All, > > >Make sure you use the correct repo. > >Installing on Perl 5.8.x ( It uses old versions, > but it works ) > >ppm3 > >rep add soulcage http://www.soulcage.net/ppds.58/ > install > Net-SSH-W32Perl > >Installing on Perl 5.6.x ( It uses old versions, > but it works ) > >rep add soulcage http://www.soulcage.net/ppds/ > install Net-SSH-W32Perl > > Note that I have successfully installed > Net::SSH:w32Perl. How ever I > have problems running my scripts. Is this module > suppose to be > equivalent to Net::SSH:Perl (A Perl module for > Linux). I have a script > that runs in Linux land without any problems but I > can't get it to run > on WinXP. I need to provide a WinXP box for a third > party to run some > tests and Hence the need for using window (Even > though I personally > can't stand WinXP). My Linux based script is: > > #!/usr/bin/perl > use strict; > use Net::SSH::w32Perl; > use Net::SSH::Perl; > my $user = "root"; > my $pass = "password"; > my $host = "192.168.0.173"; > my $cmd = "cat /proc/meminfo | grep MemFree"; > my $ssh = Net::SSH::Perl->new($host); > $ssh->login($user, $pass); > for (1..1000) > { > my ($stdout, $stderr, $exit) = $ssh->cmd($cmd); > my @temp = split /\s+/, $stdout; > my $FreeMem = $temp[1]; > Print "Current Free memory is: $FreeMem" if > ($FreeMem > 10000); > print "Current Free memory has dropped below > 10K. Free Mem is: > $FreeMem" if ($FreeMem < 10000); > if ($FreeMem < 2000) > { > print "Critical Error. Current Free memory > has dropped below 2K. > Free Mem is: FreeMem"; > last; > } > sleep 600; > } > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a > groundbreaking scripting language > that extends applications into web and mobile media. > Attend the live webcast > and join the prime developer group breaking into > this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |