in reply to SSH2 scp_get problem

I can reproduce the problem now on my WS. If you activate debug via

$ssh2->debug(1);

you'll see that things are going wrong as soon as an 'incomplete' block is read, i.e. 8192 is expected and less than that is actually read.

Once this happens, the transfer will not recover any more. I've played a bit with the code, without success so far; it seems to me that the real problem is in the underlying libssl2, but I'm not sure yet.

Update: I can confirm now that it is almost sure a libssh2 problem. The library version I have here is version 0.17. I've started looking through the code, but I'm unsure I'll be able to offer a patch anytime soon.

One other thing to try would be to test what happens with a different library version.

Update once more: I've recompiled libssh2 and rebuild Net::SSH2 for libssh2 version 0.16, 0.15, and the problem persisted. Then I tried libssh2 version 0.12 - and that was a success, I could repeatedly scp a big file (~26MB) without any problem. Success also with version 0.14. Now that seems to imply that actually Net::SSH2 (working ok with libssh2 version 0.14, failing with version >= 0.15) is behind and would need an update. What exactly that would be, I do not know. Yet ;)

Replies are listed 'Best First'.
Re^2: SSH2 scp_get problem
by RaduH (Scribe) on Oct 18, 2007 at 20:24 UTC
    yup, my libssh2 is also 0.17 :( I'm also in touch with David Robins (the developer of the module)... like you observed, SCP works for me too (all the time).