Re: [Ssh-sftp-perl-users] Net::SFTP occasional segmentation fault
Brought to you by:
dbrobins
From: John D. <jd...@lo...> - 2007-04-16 21:54:59
|
I figured out this problem. It was actually an issue with Net::SSH::Perl and Crypt::DH. The answer can be found at this link. http://www.cpanforum.com/threads/2689 _____ From: ssh...@li... [mailto:ssh...@li...] On Behalf Of John Dyer Sent: Monday, April 16, 2007 2:08 PM To: ssh...@li... Subject: [Ssh-sftp-perl-users] Net::SFTP occasional segmentation fault I tried posting this before, but not sure it got through. I can't find it in the archive. Any help would be greatly appreciated. _____ From: John Dyer [mailto:jd...@lo...] Sent: Thursday, April 12, 2007 11:30 AM To: 'ssh...@li...' Subject: Net::SFTP occasional segmentation fault HI, I have been trying to get SFTP going in a perl script but not having much luck, so to simplify matters, I have been trying to connect using the psftp client, but I am getting the same results. The odd thing is that the seg fault happens most of the time when I launch psftp from a command line, but occasionally I get a little further before getting a permission denied error. If I run it through the perl debugger, I never get the seg fault. Below are some sample outputs. This is what it looks like from the command line: ---------------------------------------------------------------------------- --------------------- [jdyer@homer bin]$ psftp -v localhost Connecting to localhost... homer.somesite.com: Reading configuration data /home/jdyer/.ssh/config homer.somesite.com: Reading configuration data /etc/ssh_config homer.somesite.com: Connecting to localhost, port 22. homer.somesite.com: Remote version string: SSH-1.99-OpenSSH_3.4p1 homer.somesite.com: Remote protocol version 1.99, remote software version OpenSSH_3.4p1 homer.somesite.com: Net::SSH::Perl Version 1.30, protocol version 2.0. homer.somesite.com: No compat match: OpenSSH_3.4p1. homer.somesite.com: Connection established. homer.somesite.com: Sent key-exchange init (KEXINIT), wait response. homer.somesite.com: Algorithms, c->s: 3des-cbc hmac-sha1 none homer.somesite.com: Algorithms, s->c: 3des-cbc hmac-sha1 none Segmentation fault ---------------------------------------------------------------------------- --------------------- This is the debugger output: ---------------------------------------------------------------------------- --------------------- [jdyer@homer bin]$ perl -d psftp -v localhost Default die handler restored. Loading DB routines from perl5db.pl version 1.07 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(psftp:9): my %opts; DB<1> r Connecting to localhost... homer.somesite.com: Reading configuration data /home/jdyer/.ssh/config homer.somesite.com: Reading configuration data /etc/ssh_config homer.somesite.com: Connecting to localhost, port 22. homer.somesite.com: Remote version string: SSH-1.99-OpenSSH_3.4p1 homer.somesite.com: Remote protocol version 1.99, remote software version OpenSSH_3.4p1 homer.somesite.com: Net::SSH::Perl Version 1.30, protocol version 2.0. homer.somesite.com: No compat match: OpenSSH_3.4p1. homer.somesite.com: Connection established. homer.somesite.com: Sent key-exchange init (KEXINIT), wait response. homer.somesite.com: Algorithms, c->s: 3des-cbc hmac-sha1 none homer.somesite.com: Algorithms, s->c: 3des-cbc hmac-sha1 none homer.somesite.com: Entering Diffie-Hellman Group 1 key exchange. homer.somesite.com: Sent DH public key, waiting for reply. homer.somesite.com: Received host key, type 'ssh-dss'. homer.somesite.com: Host 'localhost' is known and matches the host key. homer.somesite.com: Computing shared secret key. homer.somesite.com: Verifying server signature. homer.somesite.com: Waiting for NEWKEYS message. homer.somesite.com: Enabling incoming encryption/MAC/compression. homer.somesite.com: Send NEWKEYS, enable outgoing encryption/MAC/compression. homer.somesite.com: Sending request for user-authentication service. homer.somesite.com: Service accepted: ssh-userauth. homer.somesite.com: Trying empty user-authentication request. homer.somesite.com: Authentication methods that can continue: publickey,password,keyboard-interactive. homer.somesite.com: Next method to try is publickey. homer.somesite.com: Next method to try is password. homer.somesite.com: Trying password authentication. homer.somesite.com: Will not query passphrase in batch mode. homer.somesite.com: Authentication methods that can continue: publickey,password,keyboard-interactive. homer.somesite.com: Next method to try is publickey. homer.somesite.com: Next method to try is password. homer.somesite.com: Trying password authentication. homer.somesite.com: Will not query passphrase in batch mode. homer.somesite.com: Authentication methods that can continue: publickey,password,keyboard-interactive. homer.somesite.com: Next method to try is publickey. homer.somesite.com: Next method to try is password. homer.somesite.com: Trying password authentication. homer.somesite.com: Will not query passphrase in batch mode. homer.somesite.com: Authentication methods that can continue: publickey,password,keyboard-interactive. homer.somesite.com: Next method to try is publickey. homer.somesite.com: Next method to try is password. Permission denied at /usr/lib/perl5/site_perl/5.6.1/Net/SFTP.pm line 37 Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info. DB<1> I am on perl 5.6.1 and I have tried versions 0.10 and 0.08 of Net::SFTP with the same results. Any help would be greatly appreciated. Thanks, John |