Thanks Chas.

I'm able to create connection 'Net::SFTP::Foreign' object and download files
from remote machine 
whithout using thread. But when I use thread to do same I get such errors
:(.

Could you please elaborate on how to do these keys setup? Do I need to do
this specifically
Cause these think works if I don't use thread? 



~~~~~~~~~~~~~~~~~~~~
Thanks and Best regards,
~ Rajnikant
Software Engg.
Persistent Sys. Ltd.
Ph. +91 98222 04088

-----Original Message-----
From: Chas. Owens [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2008 7:09 PM
To: Rajnikant
Subject: Re: about SFTP and Thread dependency

On Wed, May 28, 2008 at 9:29 AM, Rajnikant
<[EMAIL PROTECTED]> wrote:
snip
>   $sftp = Net::SFTP::Foreign->new($host_l,%args);
>   my $err = $sftp->error();  # I get 'Password not requested as expected:
> -1' msg
>   my $stat = $sftp->status(); # $stat = 'No connection'
>   if ($sftp)
>   {
>        my $files_r=$sftp->ls($remDir); # Here I get nothing in $files_r :(
>        my $filename;
snip

If $sftp->error returns a true value then you have an error.   The
$sftp->ls method isn't working because of the earlier error. Given the fact
that you are getting "No connection" from $sftp->status, I am willing to bet
you don't have keys setup on the host and local machine.

--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.


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.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to