[Ssh-sftp-perl-users] FW: Having problems with compiling Net::SSH2
Brought to you by:
dbrobins
From: Ken B. <ken...@co...> - 2009-01-24 15:41:40
|
-----Original Message----- From: Ken Bassford [mailto:ken...@co...] Sent: Friday, January 23, 2009 20:36 To: 'Heiko Jansen' Subject: RE: [Ssh-sftp-perl-users] Having problems with compiling Net::SSH2 Hi Heiko, We finally managed to get it working, but it took running the -MCPAN... to get it to install. Despite what the documentation says, the autoinstall grabbed a whole bunch of other modules, various Crypt modules, BigInt etc.. Must have been about twenty in all. I'm using Perl 5.8.5, so I didn't need the patch you recommended. Got my first script running, while writing and testing the various features of SSH2 out, I found it to be a little idiosyncratic. Scripts that only require one command to be run remotely work very well with the exec and read commands, but the read and write commands don't like shell at all. Found that just shoving stuff up and down the pipe worked better. Also watch out for the timeouts, on a slow network connection the "while <$channel>" method will return before it receives a response. Tried to find a way that I could detect the response before trying to pull the bits back (the debug setting indicated that there was an libssh2 flag indicating bits were waiting, but I could not find the "poll" setting for it; and yes I tried looking at "poll->revents->in"). I finally just brute forced it by encapsulating make my read routine in another while loop that would take the number of seconds (times 4 for the standard 250 msec. timeout) and reenter that number of times, unless it received a response, when it would just break out of the loop. Works great for multi-line responses. Also, while I was messing around with the poll settings, I had to set the poll setting every time I wanted to issue or receive a command or they reverted back to their default values, unless I'm missing something. Thanks for the help. Sincerely, Ken -----Original Message----- From: Heiko Jansen [mailto:ja...@hb...] Sent: Monday, January 19, 2009 15:22 To: ssh...@li... Subject: Re: [Ssh-sftp-perl-users] Having problems with compiling Net::SSH2 Am Freitag, den 16.01.2009, 19:56 -0500 schrieb Ken Bassford: > I'm trying to get Net::SSH2 to run on a base load, RHEL3.1 system. I > tried doing the following steps in order, all without the slightest > hint of an error until the final step. > > 1. "make" && "make test" && "make install" on zlib 1.2.3 source > 2. "make" && "make test" && "make install" on OpenSSL 0.9.8j > source > 3. "./configure -with-zlib -with OpenSSL " &&, "make" && "make > test" (or possibly check, whatever the instructions said to > do) && "make install" on libssh2-1.0 source > 4. ran "perl Makefile.PL" && "make" without error on > Net-SSH2-0.18 source > 5. ran "make test" and got two compile errors that it could not > find two OpenSSL .h files (sorry, the system I did this on is > at work, so I'm relaying this from memeory). > > > > My question is, "Do I have to revert to the libssh2-0.12 source for > Net-SSH2-0.18 to work, or has anyone gotten it to work with more > recent builds of libssh2?" It works for me with libssh2-0.18 (as far as I remember Net-SSH2-0.18 was released to address changes therein) and libssh2-1.0, both on Solaris 10 (64Bit) and Linux (32 and 64Bit). I have not tested with OpenSSL 0.9.8j (0.9.8h was the latest I used, I think, on one of the installations). If you use Perl 5.10 you need to patch Net::SSH2 (cf. http://rt.cpan.org/Ticket/Display.html?id=37045) but it does not sound as if you were running into that problem. Never saw anything like what you describe ("could not find two OpenSSL .h files during 'make test'"). Heiko Besuchen Sie das hbz auf der Bielefeld Conference vom 3. bis 5. Februar an Stand 7 ! |