[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Errors after migrating from 0.6.0rc1 to 0.6.4


On Wednesday 08 April 2015 09:10:02 Kevin Stewart wrote:
> "I developed a Windows-based (using VS2010) server application..."
> 
> I am running on the Windows platform. There is no fork() implementation on
> Windows.
> 
> The only real difference between the example you suggested and my code is I
> am using threads to handle sessions instead of fork().
> 
> I am still getting client (putty) disconnects with "Incoming packet was
> garbled on decryption" during the key exchange. I wrote a NodeJS SSH2
> client to test with also, and it is  throwing an exception stating "Bad
> packet length".
> 
> 
> On 4/8/2015 12:50 AM, Andreas Schneider wrote:
> On Tuesday 07 April 2015 09:32:53 Kevin Stewart wrote:
> More information:
> 
> In 0.6.0rc1 I could use WSAAsyncSelect to determine when a client was
> connecting, but in 0.6.4 I can't. I rewrote the code around the
> ssh_bind_listen() to use  select() instead and now things are MOSTLY
> working.
> 
> I am still getting client (putty) disconnects with "Incoming packet was
> garbled on decryption" during the key exchange. I wrote a NodeJS SSH2
> client to test with also, and it is throwing an exception stating "Bad
> packet length".
> 
> On 4/6/2015 6:31 PM, Kevin Stewart wrote:
> I developed a Windows-based (using VS2010) server application using the
> 0.6.0rc1 version of libssh and was getting memory leaks on a per connection
> basis. I decided to migrate to the latest version (0.6.4) to see if it
> alleviated these leaks and ran into different issues. The first issue is in
> socket.c starting at line 314. ssh_socket_set_blocking() is failing and
> WSAGetLastError() is returning 10022 (WSAEINVAL). Since sockets are
> initially in blocking mode ("When a socket is created, it operates in
> blocking mode by default (nonblocking mode is disabled). This is consistent
> with BSD sockets." -
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms738573(v=vs.85).
> aspx), I commented out the section of code to get passed the error. Now,
> during the key exchange, clients (putty), disconnects with "Incoming packet
> was garbled on decryption".
> You should use our infrastructure and implement a callback based server.
> 
> https://git.libssh.org/projects/libssh.git/tree/examples/ssh_server_fork.c
> 
> You should use ssh_event ...
> 

Increase the log of the server and provide the log here, maybe we can help 
then ...


	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


References:
Errors after migrating from 0.6.0rc1 to 0.6.4Kevin Stewart <kstewart@xxxxxxxxxx>
Re: Errors after migrating from 0.6.0rc1 to 0.6.4Andreas Schneider <asn@xxxxxxxxxxxxxx>
Re: Errors after migrating from 0.6.0rc1 to 0.6.4Kevin Stewart <kstewart@xxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org