in reply to Net::SSH2 dumping core

At what point does the segfault occur ? When Net::SSH2 is loaded ? ... or when new() is called ? ... or when connect() is called ?

A few lines down from the top of t/Net-SSH2.t (in the Net-SSH2 source distro) you'll see:
my ($host, $user, $pass) = qw();
Change that to:
my ($host, $user, $pass) = qw(192.168.0.18 user pass);
and then run that script: perl t/Met-SSH2.t
Perhaps that will help pinpoint when/where the error occurs.

Be aware that, having done that, t/Net-SSH2.t now contains your username and password (in plain text) for anyone who opens the file to view.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Net::SSH2 dumping core
by ashok.g (Beadle) on Mar 29, 2012 at 22:04 UTC
    Hi Rob,

    Thanks for the reply. The core is dumping when it is trying to connect. See the following output of Net::SSH.t
    bash-3.00# perl Net-SSH2.t 1..73 ok 1 - use Net::SSH2; ok 2 - new session isa Net::SSH2 ok 3 - error state clear ok 4 - set banner ok 5 - LIBSSH2_* constants ok 6 - list version match ok 7 # skip version not decimal ok 8 - banner is SSH-2.0-libssh2_1.4.0 ok 9 - poll indefinite ok 10 - poll 1/4 second ok 11 - ->sock is undef before connect Segmentation Fault (core dumped)
    Please advice.

    Thanks,
    Ashok.