Lars Nordin | 30 Mar 17:22 2015
Picon

Github commits

Hi,

I now started to commit the changes I made to improve speed in SFTP_read.

My first try was a change in openssl.c, the #ifdef LIBSSH2_DSA was 
needed on more places in the code (yes, I work with an openSSL without DSA)

My name on GitHub is LarsNordin-LNdata

Should I just continue to add the rest of the patches or...

/Lars
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
meneldor | 30 Mar 15:22 2015
Picon

libssh2_sftp_init() returns LIBSSH2_ERROR_EAGAIN forever

Hi again :)

Im trying to open LIBSSH2_SFTP session in non-blocking mode but it always returns LIBSSH2_ERROR_EAGAIN. Here is the code:

     do {
        m_sftp_session = libssh2_sftp_init(m_ssh_session);
        if (!m_sftp_session)  {
            if (libssh2_session_last_errno(m_ssh_session) == LIBSSH2_ERROR_EAGAIN){
                qDebug() << "waitsocket";
                waitsocket();
            } else{
                qDebug() << "Unable to init SFTP session";
                return false;
            }
        }
    } while (!m_sftp_session);

m_ssh_session is valid LIBSSH2_SESSION which i use for libssh2_channel_open_session(m_ssh_session) without any problem. 
Here is the trace log: http://pastebin.com/2uK6tqvB




_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
libssh2 Trac | 30 Mar 14:37 2015
Picon

#297: `libssh2_{md5, sha1}{, _init}` symbols are exposed in OpenSSL build

#297: `libssh2_{md5,sha1}{,_init}` symbols are exposed in OpenSSL build
-----------------------+------------------
 Reporter:  dottedmag  |       Owner:
     Type:  defect     |      Status:  new
 Priority:  normal     |   Milestone:
Component:  misc       |     Version:
 Keywords:             |  Blocked By:
   Blocks:             |
-----------------------+------------------
 If libssh2 is built with OpenSSL, then internal symbols
 `libssh2_md5_init`, `libssh2_md5`, `libssh2_sha1_init`, `libssh2_sha1` are
 exposed. `gcrypt`-based builds do not expose them.

--

-- 
Ticket URL: <https://trac.libssh2.org/ticket/297>
libssh2 <https://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
libssh2 Trac | 30 Mar 14:36 2015
Picon

#296: OpenSSL picked up even with `--enable-gcrypt`

#296: OpenSSL picked up even with `--enable-gcrypt`
-----------------------+------------------
 Reporter:  dottedmag  |       Owner:
     Type:  defect     |      Status:  new
 Priority:  normal     |   Milestone:
Component:  misc       |     Version:
 Keywords:             |  Blocked By:
   Blocks:             |
-----------------------+------------------
 If there are OpenSSL headers/library on the system, it gets picked up
 automatically even if `--enable-gcrypt` is specified. One has to
 explicitly pass `--disable-openssl` to get `gcrypt`-enabled build.

--

-- 
Ticket URL: <https://trac.libssh2.org/ticket/296>
libssh2 <https://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Peter Stuge | 29 Mar 19:09 2015
Picon

Re: repeated colored prompts

meneldor wrote:
> I am not sure and just trying to figure out why is this happening.
> Only if the prompt is colored (for example libssh2_channel_request_pty()
> "xterm" or "ansi") so there are some escape codes.

You are implementing a terminal emulator. That is completely
unrelated to the terminal transport, which is what libssh2 is
in this case.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
meneldor | 29 Mar 11:47 2015
Picon

repeated colored prompts

Hello,

I stuck on a problem where when im reading the remote shell, if its colored, i receive the prompts several times. Is that related to the window size which is not properly calculated because of the not printable escape codes? Can i use any of the libssh2_channel_window_* functions to solve this problem?

Thanks!
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Gilbert (Gang) Chen | 27 Mar 02:07 2015

llibssh2 may drop data packets beyond receive window

Hi, there,

    I'm the developer of Acrosync, a new rsync client built from scratch, independent of the GPL'ed rsync.  libssh2 is used for the ssh layer.

    Recently I found out that libssh2 may drop some data packets, which presents a serious problem for rsync because the data stream becomes corrupted and the error is irrecoverable.  I traced that down to a place in packet.c where it says "The current receive window is full, data ignored".  The root cause of this error is still unknown (the server side could have miscalculated the window size), but is it the right decision to drop packets under this circumstance, even if the Spec said so?  I think keeping all data packets regardless of the receive window size would make libssh2 more resilient to bugs.

Thanks,
Gang
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
libssh2 Trac | 23 Mar 22:53 2015
Picon

Re: #244: scp_send may transmit not initialised memory

#244: scp_send may transmit not initialised memory
---------------------------+----------------------
  Reporter:  torsten.rupp  |      Owner:
      Type:  defect        |     Status:  closed
  Priority:  normal        |  Milestone:
 Component:  SCP           |    Version:  1.4.1
Resolution:  fixed         |   Keywords:  scp_send
Blocked By:                |     Blocks:
---------------------------+----------------------
Changes (by mback2k):

 * status:  new => closed
 * resolution:   => fixed

Comment:

 Fixed with commit b99204f2896b0cdafa3ecc0736f0252ce44c32c7. Thanks.

--

-- 
Ticket URL: <https://trac.libssh2.org/ticket/244#comment:2>
libssh2 <https://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
meneldor | 23 Mar 16:00 2015
Picon

LIBSSH2_ERROR_OUT_OF_BOUNDARY

Hello,

i have a question about libssh2_channel_read() and LIBSSH2_ERROR_OUT_OF_BOUNDARY.
When the blocking is disabled, any buffer size bigger than 0xf returns LIBSSH2_ERROR_OUT_OF_BOUNDARY error. Here is the trace of the command "ls":
[libssh2] 12.046214 Conn: Writing 3 bytes on channel 3/0, stream #0
[libssh2] 12.046228 Conn: Sending 3 bytes on channel 3/0, stream_id=0
=> libssh2_transport_write plain (9 bytes)
0000: 5E 00 00 00 00 00 00 00  03                      : ^........
=> libssh2_transport_write plain2 (3 bytes)
0000: 6C 73 0A                                         : ls.
[libssh2] 12.046279 Socket: Sent 52/52 bytes at 0x28e58f0
=> libssh2_transport_write send() (52 bytes)
0000: 07 78 EF C4 34 BA 9F E1  D7 DA 3A BE 94 2A A9 46 : .x..4.....:..*.F
0010: 33 9E C8 FF F2 1A 6B 4F  00 7E 21 2E 47 2D 49 B5 : 3.....kO.~!.G-I.
0020: 6F 6F A4 97 0A E5 7E 7B  E6 8C 3E 3C 8F 4A D7 F5 : oo....~{..><.J..
0030: 6E E5 3A 6B                                      : n.:k
[libssh2] 12.046290 Conn: channel_read() wants 40000 bytes from channel 3/0 stream #0

NOTE!: channel_read() returns -37 here so i am waiting in waitsocket()

[libssh2] 12.046773 Conn: channel_read() wants 40000 bytes from channel 3/0 stream #0
[libssh2] 12.046784 Socket: Recved 52/16384 bytes to 0x28e18b0+0
=> libssh2_transport_read() raw (52 bytes)
0000: C0 B8 79 A6 B3 58 37 85  A9 36 36 90 D3 73 12 F0 : ..y..X7..66..s..
0010: 4D F3 F8 31 75 CA C5 F7  38 D3 C9 48 F0 5F 04 F3 : M..1u...8..H._..
0020: 0A 80 36 F9 11 27 18 51  D1 7C 8A F9 1B C6 21 7B : ..6..'.Q.|....!{
0030: 2C B4 EE 13                                      : ,...
[libssh2] 12.046796 Failure Event: -41 - transport read
libssh2_channel_read returned: -41

Thanks!
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Lars Nordin | 23 Mar 14:52 2015
Picon

SFTP read in libssh2 compared to SecureCRT

Hi,

I'm using libssh2 for different purpose, one of them is write/read files 
using SFTP. I just start using version 1.5.0 and I can't get the 
SFTP-read up to speed. I'm testing with a 76M file and using SecureCRT 
SFTP I get 81s for the download, with libssh2 SFTP 44 minutes!!!

If a use SCP I get download in 12s!!

The libssh2_sftp_read() always return 2000, despite I call it with a 
buffer of 100k.

If a look at the network with wireshark and compare the data on the 
network, I notice that
o    with SecureCRT SFTP the server send data in 1460 sized packages, at 
least 10 packets before the client send some data (up to 32 packets I 
notice)
o    with libssh2 the server send data in different sizes (1460 and 
less, many times 1460 followed by 592) and 1-4 packets before the client 
send something.

The test is done using a OpenSSH sshd in a Linux virtual machine. Client 
is Windows7

I copied the sftp_RW_nonblock example.

Can I change something?

/Lars

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Daniel Stenberg | 15 Mar 13:01 2015
Picon

commit notices

Hey

I added an IRC notice for each commit and an email notice to the 
libssh2-changes mailing list, for us who want to get a little alert when 
things move in the git repo...

--

-- 

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

Gmane