- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Net::SSH Module
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 06:35 PM
02-22-2006 06:35 PM
Iam using Net::SSH::Perl module for remote login. This module was installed successfully.
when i try to run a sample script
#!/usr/bin/perl
use Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new($host,port=>22);
$ssh->login($user, $pass);
i get the following error
Can't locate Math/GMP.pm in @INC (@INC contains: /opt/perl_32/lib/5.8.7/PA-RISC1.1-thread-multi /opt/perl_32/lib/5.8.7 /opt/perl_32/lib/site_perl/5.8.7/PA-RISC1.1-thread-multi /opt/perl_32/lib/site_perl/5.8.7 /opt/perl_32/lib/site_perl /opt/perl_32/lib/vendor_perl/5.8.7/PA-RISC1.1-thread-multi /opt/perl_32/lib/vendor_perl/5.8.7 /opt/perl_32/lib/vendor_perl .) at /opt/perl_32/lib/site_perl/5.8.7/Net/SSH/Perl/Util/SSH1MP.pm line 7,
BEGIN failed--compilation aborted at /opt/perl_32/lib/site_perl/5.8.7/Net/SSH/Perl/Util/SSH1MP.pm line 7,
Compilation failed in require at /opt/perl_32/lib/site_perl/5.8.7/Net/SSH/Perl/Util.pm line 56,
BEGIN failed--compilation aborted at /opt/perl_32/lib/site_perl/5.8.7/Net/SSH/Perl/Key/RSA1.pm line 6,
Compilation failed in require at /opt/perl_32/lib/site_perl/5.8.7/Net/SSH/Perl/SSH1.pm line 13,
BEGIN failed--compilation aborted at /opt/perl_32/lib/site_perl/5.8.7/Net/SSH/Perl/SSH1.pm line 13,
Compilation failed in require at /opt/perl_32/lib/site_perl/5.8.7/Net/SSH/Perl.pm line 51,
when i try to install the Math::GMP from cpan where it tries to install math::GMP 2.04, it fails in >make. Does anyone which is the stable version of Math::GMP after 1.04 available on cpan or any other site
Thanks n Regards,
rashmi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 07:30 PM
02-22-2006 07:30 PM
Re: Net::SSH Module
/opt/perl_32/lib/5.8.7/PA-RISC1.1-thread-multi /opt/perl_32/lib/5.8.7 /opt/perl_32/lib/site_perl/5.8.7/PA-RISC1.1-thread-multi /opt/perl_32/lib/site_perl/5.8.7 /opt/perl_32/lib/site_perl /opt/perl_32/lib/vendor_perl/5.8.7/PA-RISC1.1-thread-multi /opt/perl_32/lib/vendor_perl/5.8.7 /opt/perl_32/lib/vendor_perl
Else download the Math/GMP.pm and install to that location. Problem will be solved.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 07:34 PM
02-22-2006 07:34 PM
Re: Net::SSH Module
http://sources.redhat.com/ml/cygwin/2001-05/msg01343.html
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 07:41 PM
02-22-2006 07:41 PM
Re: Net::SSH Module
Did you run Perl test after comipiling ? It should be helpful..
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 07:45 PM
02-22-2006 07:45 PM
Re: Net::SSH Module
It fails in the installation itself. when i try to run Math::GMP
Rashmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 07:46 PM
02-22-2006 07:46 PM
Re: Net::SSH Module
It fails in the installation itself. when i try to run Math::GMP
If i take only GMP.pm and complie it .. will it work
Rashmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 07:48 PM
02-22-2006 07:48 PM
Re: Net::SSH Module
Yes, installing GMP.pm module should be helpful. Try and let us know.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 08:20 PM
02-22-2006 08:20 PM
Re: Net::SSH Module
$ cd Math-GMP-1.07
$ ls
COPYING.LIB GMP.pm LICENSE Makefile.PL gmp-2.0.2.tar.gz typemap
Changes GMP.xs MANIFEST README test.pl
$ perl Makefile.PL
sh: /gzip: not found.
Tar: blocksize = 0; broken pipe?
tar extraction of gmp-2.0.2.tar.gz failed at Makefile.PL line 11.
$ make
Make: No arguments or description file. Stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 08:32 PM
02-22-2006 08:32 PM
Re: Net::SSH Module
$ ls
COPYING.LIB GMP.pm LICENSE Makefile.PL gmp-2.0.2.tar.gz typemap
Changes GMP.xs MANIFEST README test.pl
$ perl Makefile.PL
sh: /gzip: not found.
Tar: blocksize = 0; broken pipe?
tar extraction of gmp-2.0.2.tar.gz failed at Makefile.PL line 11.
$ make
Make: No arguments or description file. Stop.
gzip is not available in your path.. also, make sure your download is not corrupted..
# where `which gzip`
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 08:42 PM
02-22-2006 08:42 PM
Re: Net::SSH Module
export PATH=$PATH:/usr/contrib/bin
try again.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 08:43 PM
02-22-2006 08:43 PM
Re: Net::SSH Module
Well i have my gzip in path. coz when i try to install other modules i don't get errors. Only for this module i get this
Regards,
Rashmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 09:24 PM
02-22-2006 09:24 PM
Re: Net::SSH Module
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 09:32 PM
02-22-2006 09:32 PM
Re: Net::SSH Module
Try to change the gzip path in Makefile.PL
# grep -i gzip Makefile.PL will list you. You can edit and make changes.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 09:46 PM
02-22-2006 09:46 PM
Re: Net::SSH Module
#perl Makefile.pl
succeeded
but # make install i got this errors
$ make install
cp GMP.pm blib/lib/Math/GMP.pm
AutoSplitting blib/lib/Math/GMP.pm (blib/lib/auto/Math/GMP)
/usr/bin/perl /opt/perl_32/lib/5.8.7/ExtUtils/xsubpp -typemap /opt/perl_32/lib/5.8.7/ExtUtils/typemap -typemap typemap GMP.xs > GMP.xsc && mv GMP.xsc GMP.c
Please specify prototyping behavior for GMP.xs (see perlxs manual)
cc -c -Igmp/include -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0 -DVERSION=\"1.07\" -DXS_VERSION=\"1.07\" +Z "-I/opt/perl_32/lib/5.8.7/PA-RISC1.1-thread-multi/CORE" GMP.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Z option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 422: Unknown option "f" ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Opromote_indirect_calls option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Z option is available only with the C/ANSI C product; ignored.
cpp: "/opt/perl_32/lib/5.8.7/PA-RISC1.1-thread-multi/CORE/perlio.h", line 108: error 4065: Recursion in macro "PerlIO".
*** Error exit code 1
Stop.
which i had got when i was trying to install directly from cpan.
Thanks
Rashmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 09:49 PM
02-22-2006 09:49 PM
Re: Net::SSH Module
You dont have AnsiC compiler installed. Rather, you can use GCC to build this module.
# export CC=/usr/local/bin/gcc
then, # perl Makefile.PL
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 09:51 PM
02-22-2006 09:51 PM
Re: Net::SSH Module
succeeded. but with warnings and errors. pl see the attached file
I think am getting same erros which i had got when i was trying to install directly from cpan.
Thanks
Rashmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 09:57 PM
02-22-2006 09:57 PM
SolutionIts again taking bundled C compiler make "CC=cc" "CFLAGS=-g -O" "XCFLAGS=" libmpn.a
You have to perform a # make clean and # make distclean before starting fresh..
Or, deleting that directory and untar/ungzip should help. (You have to start from fresh compilation since makefile is old and takes cc)
Also, dont forget to export gcc as your compiler.
-Arun
P.S Remember to assign points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 10:02 PM
02-22-2006 10:02 PM
Re: Net::SSH Module
Refer this. Will solve problem.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 10:47 PM
02-22-2006 10:47 PM
Re: Net::SSH Module
Just check this,
# which perl
# perl -V
Try to use Procura's perl versions which can be downloaded from his site..
http://mirrors.develooper.com/hpux/
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2006 02:42 AM
02-24-2006 02:42 AM
Re: Net::SSH Module
1st way
#perl -MCPAN -e shell
cpan>install bundle
cpan>install SSH::Net
2nd Way
Download the source from Cpan.
#perl Makefile.PL
#gmake (make sure you use gcc)
#gmake test (make sure it passes all the test)
#gmake install
If you could post the output of the following
#ldd /usr/local/bin/perl
#perl -V
And then add a -w ( warning) at the very 1st line of your perl script and see what you get.
Thanks
Pratyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2006 09:00 PM
09-27-2006 09:00 PM
Re: Net::SSH Module
how i can login to remote host and change it to super user with net::ssh?
or can u give me some sample script to do that
thanx a lot....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2006 10:04 PM
09-27-2006 10:04 PM
Re: Net::SSH Module
script to login
#!/usr/bin/perl
use Net::SSH::Perl;
$user='weblogic';
$pass='';
$host='hostname.hp.com';
print "before login \n";
my $ssh = Net::SSH::Perl->new($host,port=>22);
print "$user,$pass \n";
$ssh->login($user, $pass);
print "before cmd \n";
my($out, $err) = $ssh->cmd($cmd || "ls");
print "after login \n";
print $out;
$ssh->cmd("exit");