[Libssh] Windows, samplesshd

Keisial keisial at gmail.com
Sun Mar 2 17:11:02 CET 2008


Juergen Schoenwaelder wrote:
> Keisial wrote:
>  
>   
>> Noww, when testing the resulting server code, it didn't work. Seemed that
>> session->alive wasn't never set. Odd, as it isn't related to the porting.
>> So i went to a Linux box, compiled the original libssh-0.2 
>> <http://0xbadc0de.be/libssh/libssh-0.2.tgz> and sure enough, it also
>> failed with "ssh_accept : Remote host closed connection"
>>
>> Am i missing something obvious? Is the samplesshd at libssh-0.2.tgz 
>> really broken? <http://0xbadc0de.be/libssh/libssh-0.2.tgz>
>> What should i do to fix it? Perhaps you have a better version at a 
>> repository?
>>     
>
> I have posted a patch to fix this and a few other things a long time
> ago on this list. If there are archives of the list, you will find it
> there. Otherwise, I can pull it out of my archive if needed.
>
> /js
>   
Thanks, Juergen. I only took a brief look at the mailing list. Plus i 
thought the "Christmas release"
 was of 2007's, not from 2006.
Both you and Brendan  posted fixed to that by adding the 
session->alive=1; as i already realised.
In fact, it is now fixed at the repository.
However the other problem Brendan reported still happens. libssh works 
only with aes128-cbc and blowfish-cbc.
3des-cbc, aes192-cbc and aes256-cbc produce a Packet len too high error. 
Even worse, asking for an unsupported
cipher (aes128-ctr, aes192-ctr, aes256-ctr, arcfour, arcfour128, 
arcfour256, cast128-cbc...) make the server segfault :(
Also, if the client is putty, i get a "Server refused to allocate pty" 
message, but otherwise seem to work.

About the OO. I think it should continue being a C library. Which 
doesn't mean you can't have a C++
wrapper. Most functions already have a OO-style, with the first 
parameter being a pointer. So the C++
could simply inherit the C structure as protected and call to the 
corresponding C function with this as
the first parameter.


Aris wrote:
> The bug was fixed several months ago in the subversion, but I never 
> released it. If you send me your windows patch, i can apply it too.
> Is there an autotools guru here who can make configure works on windows ?
>   
Is a configure really needed on Windows? The option range is usually 
much small.
Also, i'm only targeting since Windows Server 2003, Windows XP 
(getaddrinfo may not be available at earlier versions) at 32 bit
(just for now, having sizeof SOCKET == sizeof int is easier). Thus the 
only options to determine would be openssl/gcrypt and zlib or not.




More information about the Libssh mailing list