http://www.perlmonks.org?node_id=770208


in reply to Re: SFTP Protocal
in thread SFTP Protocal

The 6th line of DH.pm has use Math::BigInt lib => "GMP,Pari"; My program got segmentation fault after gettting the below error . Herewith I have mentioned the debug log of my program ,Please look at this Reading configuration data /root/.ssh/config Reading configuration data /etc/ssh_config Allocated local port 1023. Connecting to 192.168.1.130, port 22. Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-9 Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::FastCalc at /usr/lib/perl5/site_perl/5.6.1/Crypt/DH.pm line 6 Net::SSH::Perl Version 1.34, protocol version 2.0. No compat match: OpenSSH_4.3p2 Debian-9. Connection established. Sent key-exchange init (KEXINIT), wait response. Algorithms, c->s: 3des-cbc hmac-sha1 none Algorithms, s->c: 3des-cbc hmac-sha1 none Segmentation fault . I think that In perl5.6.0 , doesn't has GMP and Pari files .

Replies are listed 'Best First'.
Re^3: SFTP Protocal
by syphilis (Archbishop) on Jun 10, 2009 at 06:48 UTC
    The 6th line of DH.pm has use Math::BigInt lib => "GMP,Pari";

    That means it will try to use Math::BigInt::GMP. If that fails it will try to use Math::BigInt::Pari. If that also fails it will use Math::BigInt::FastCalc and print out the message.

    I would be surprised if installing Math::BigInt::GMP would fix the segfault. I would think the segfault is being caused by a different issue - but I don't know what that issue is.

    I think that In perl5.6.0 , doesn't has GMP and Pari files.

    Without GMP and Pari, I don't think you would have been able to get Net::SSH::Perl to install - but I've never used Net::SSH::Perl, and am no expert.
    Instead, I use Net::SSH2 - which needs the libssh2 library.
    I *think* Net::SFTP also provides good mileage on linux - though I've never used it either, as I'm on Windows.

    Cheers,
    Rob
Re^3: SFTP Protocal
by Khen1950fx (Canon) on Jun 10, 2009 at 08:39 UTC
    We could help you more if you can post some code. Meanwhile, GMP would require The GNU MP Bignum Library. Do you have libgmp installed? Ordinarily, I would say that Math::Pari wasn't working, but it seems to be working. Check that you have all the dependencies installed. If you need some help posting some code, just ask-:).