Subject: Re: libssh2_scp_recv is not populating struct stat

Re: libssh2_scp_recv is not populating struct stat

From: £Å£ö£å£ò <unix_at_vip.qq.com>
Date: Thu, 11 Oct 2012 19:54:32 +0800

hi
    I got. Thanks a lot.
    The sftp do work well.

  

 ------------------ Original ------------------
  From: "Peter Stuge"<peter_at_stuge.se>;
 Date: Thu, Oct 11, 2012 06:58 PM
 To: "libssh2-devel"<libssh2-devel_at_cool.haxx.se>;
 
 Subject: Re: libssh2_scp_recv is not populating struct stat

 

Hi!

£Å£ö£å£ò wrote:
> Please chek the new scp_libgcrypt.log file.

With the latest change it is now showing the same result as when
using OpenSSL. Note that the scp command fails. The server returns
an error message:


> [libssh2] 0.618278 Transport: Packet type 2 received, length=5
> => libssh2_transport_read() plain (105 bytes)
> 0000: 5F 00 00 00 00 00 00 00 01 00 00 00 5C 73 63 70 : _...........\scp
> 0010: 3A 20 46 41 54 41 4C 3A 20 45 78 65 63 75 74 69 : : FATAL: Executi
> 0020: 6E 67 20 73 73 68 31 20 69 6E 20 63 6F 6D 70 61 : ng ssh1 in compa
> 0030: 74 69 62 69 6C 69 74 79 20 6D 6F 64 65 20 66 61 : tibility mode fa
> 0040: 69 6C 65 64 20 28 43 68 65 63 6B 20 74 68 61 74 : iled (Check that
> 0050: 20 73 63 70 31 20 69 73 20 69 6E 20 79 6F 75 72 : scp1 is in your
> 0060: 20 50 41 54 48 29 2E 0D 0A : PATH)...

This error message is present also in your OpenSSL log.

If libssh2 does not reflect the correct exit-status after the
channel has closed then that is a bug.

Note that scp is not always the best option for file transfer. It's
only included for compatibility. If possible I recommend to use SFTP
instead. Now that libgcrypt works, take a look at the sftp example
programs.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-10-11