briandfoy / net-ssh-perl

Development on the Net::SSH::Perl module to support latest ciphers, key exchange mechanisms, etc.
Other
4 stars 1 forks source link

Your vendor has not defined Fcntl macro F_SETFL, used at C:/Perl/site/lib/Net/SS #38

Open briandfoy opened 1 year ago

briandfoy commented 1 year ago

This ticket was imported from rt.cpan.org 72953

HI, I would require help with Net::ssh::perl module. Please let me know if any one worked with this module.

use Net::SSH::Perl; 
$test="10.58.121.6 10.58.121.8" ; 

@nodename=split( ' ', $test ); 

foreach $hostname (@nodename) { 

$ssh = Net::SSH::Perl->new($hostname, port => 22); 

print "$hostname "; 

$ssh->login("osdss", "sis"); 

chomp ( my $cmd = 'prtpicl -v -c temperature-sensor | grep Temperature | 
awk \'{ a = $2 ; getline ; b = $2 ; getline ; print "CPU:"a" 
CASE:"b}\''); 

my($out, $err) = $ssh->cmd($cmd || "ls -l"); 

print $out; 

$ssh->cmd("exit"); 
} 

Error:

D:\LEARN\PERL>perl ss1.pl
Math::BigInt: couldn't load specified math lib(s), fallback to 
Math::BigInt::Cal
c at C:/Perl/site/lib/Crypt/DH.pm line 6
Your vendor has not defined Fcntl macro F_SETFL, used at 
C:/Perl/site/lib/Net/SS
H/Perl.pm line 214.
briandfoy commented 1 year ago

from naveen.nvr@gmail.com


On Mon Dec 05 01:54:13 2011, Naveenz wrote:

HI, I would require help with Net::ssh::perl module. Please let me know if any one worked with this module.

=========Script============== use Net::SSH::Perl; $test="10.58.121.6 10.58.121.8" ;

@nodename=split( ' ', $test );

foreach $hostname (@nodename) {

$ssh = Net::SSH::Perl->new($hostname, port => 22);

print "$hostname ";

$ssh->login("osdss", "sis");

chomp ( my $cmd = 'prtpicl -v -c temperature-sensor grep Temperature

awk \'{ a = $2 ; getline ; b = $2 ; getline ; print "CPU:"a" CASE:"b}\'');

my($out, $err) = $ssh->cmd($cmd || "ls -l");

print $out;

$ssh->cmd("exit"); } ==============DONE========================= ==========ERROR========================= D:\LEARN\PERL>perl ss1.pl Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Cal c at C:/Perl/site/lib/Crypt/DH.pm line 6 Your vendor has not defined Fcntl macro F_SETFL, used at C:/Perl/site/lib/Net/SS H/Perl.pm line 214.

Perl Version

This is perl 5, version 12, subversion 3 (v5.12.3) built for MSWin32-
x86-multi-t
hread
(with 9 registered patches, see perl -V for more detail)

Copyright 1987-2010, Larry Wall

Binary build 1204 [294330] provided by ActiveState 
http://www.ActiveState.com
Built Feb  9 2011 14:38:22

Perl may be copied only under the terms of either the Artistic License 
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to 
the
Internet, point your browser at http://www.perl.org/, the Perl Home 
Page.
briandfoy commented 1 year ago

from naveen.nvr@gmail.com


Operating system is WINDOWS XP

briandfoy commented 1 year ago

This may depend on #19