------------------------------------------------
On 8 Jul 2003 11:06:51 -0000, "vemulakonda uday bhaskar" <[EMAIL PROTECTED]> wrote:

> hi all
> 
> the previous mail is not complete .
> 
> i have a code in perl which uses sftp between linux systems.
> 
> the code is:
> 

Please copy and paste in the future, this is a very exact science and clearly below is 
not what "the code is" as there are syntax errors and spelling issues. We can help you 
but we need to be able to see where the errors come from, which means we need an 
accurate and complete picture.

> #!/usr/local/bin
> 
> use strict;
> use warnings;
> 
> use Net::SFTP;
> 
> my $host="xxx.xxx.xxx.xxx";
> $u="username";
> $p="password";
> my 
> $sftp=Net::SFTP->new($host,Proto=>"tcp",user=>"$u",password=>"$p")
>                       or die "cannot connect";
> 
> and i have installed sftp-0.9.9

What is sftp-0.9.9, the module you are using only goes to 0.05? I am assuming you have 
all of the required dependencies for Net::SFTP installed, such as Net::SSH::Perl, and 
all of its corresponding dependencies?  Have you been able to connect using the 
Net::SSH::Perl module directly?

>From the docs:

"Net::SFTP is a pure-Perl implementation of the Secure File Transfer Protocol 
(SFTP)--file transfer built on top of the SSH protocol. Net::SFTP uses Net::SSH::Perl 
to build a secure, encrypted tunnel through which files can be transferred and 
managed."  

It does *NOT* use the command line 'sftp' tool found on many *nixes.

> 
> but it is givibg error saying that
> "Requestion for subsystem 'sftp' failed on channel'1' at 
> /usr/lib/perl15/site_perl/5.6.0/Net.SFTP.pn at line 66
> 
> and when i go thru the path above and see the 66th line of 
> SFTP.pm
> it is like this
> 
> "
> line : my $subsystem_reply=sub{
>         my($channel,$packet)[EMAIL PROTECTED];
>         my $id=$packet->get_int32;
>         if($packet->type==SSH2_MSG_CHANNEL_FAILURE)
>         {
>            $channel->{ssh}->fatal_disconnect("Request
>            for"."subsystem 'sftp' failed on channe; '$id'");
>         }
>         $channel->{ssh}->break_client_loop;
> }"
> 
> please tell me wqhats going wrong and why the error is coming
> how to rectify it.
> 

When does the error happen?  Is it being thrown by your "die" when it returns from the 
constructor or is it happening sooner?  Can you turn on debugging in the Net::SFTP 
module and provide its output?

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to