www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: libssh2 thread safety

Re: libssh2 thread safety

From: Peter Stuge <peter_at_stuge.se>
Date: Mon, 16 Apr 2012 21:10:16 +0200

Jasmeet Bagga wrote:
> This shows that the remote protocol version is 1.99. Does libssh2
> work with that ?

As the RFC specifies, 1.99 means that the server can do both 1.0
and 2.0 protocols. Since you have a product based on SSH you really
should take a few hours to study the protocol RFCs. They are very

> [libssh2] 0.956528 Conn: Setting blocking mode OFF
> [libssh2] 0.956546 Transport: session_startup for socket 13
> [libssh2] 0.956554 Transport: Sending Banner: SSH-2.0-libssh2_1.4.1
> [libssh2] 0.956561 Socket: Sent 23/23 bytes at 0xbb9345+0
> [libssh2] 0.956992 Socket: Recved 0 bytes banner
> [libssh2] 0.956996 Failure Event: -43 - Failed getting banner
> [libssh2] 0.957045 Transport: Disconnecting: reason=11, desc=, lang=
> => libssh2_transport_write plain (13 bytes)

The log shows that the problem is very very early. The problem is not
likely with libssh2 at all but in your application, and the root
problem will be something you do or do not do to the socket between
start of your program and calling libssh2_session_handshake().

libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-04-16

the libssh2 team