Getting Segmentation fault

[email protected] ("Rajnikant")
Newsgroups perl.beginners
Message-ID <[email protected]>
Hello everyone,
 
I want to connect my client to multiple servers and download files using
SFTP.
So as to connect and download file from server I'm using seperate thread.
I'm 
getting segmentation fault while creating the SFTP connection/Object in
SFTP::New method.
Following is the code snipet:
 
use threads;
use Net::SFTP;
 
my $host = 'xx.yy.zz.aa';
my $user = 'usr';
my $password = 'usr123';
 
my $thread = threads->new (\&ftpThreadEntry,$host,$user,$password);
my $thread1 = threads->new (\&ftpThreadEntry,$host,$user,$password);
 
sub ftpThreadEntry()
{
   my $host_l = shift;
   my $usr = shift;
   my $passwd = shift;
   print( "$host $usr $passwd \n");
 
   my %args = (
       "user",        $usr,
       "password",    $passwd
   );
 
   my $sftp = Net::SFTP->new($host_l,%args);
   if ($sftp)
   {
       print(" got connected to $host_l now\n");
   }
}
 
$thread->join();
$thread1->join();
 
after runing this, I'm getting following errors messages:
PARI:   ***   forbidden at
/usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 17.
thread failed to start: PARI:   ***   unknown type 41. at
/usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 17.
Segmentation fault

Could someone please help me out finding whats wrong in code?
Thanks in advance.

~~~~~~~~~~~~~~~~~~~~

Thanks and Best regards,

~ Rajnikant

Software Engg.

Persistent Sys. Ltd.

Ph. +91 98222 04088

 

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.