Aris Adamantiadis | 1 Jun 2011 13:51
Picon
Gravatar

libssh 0.5 released

  _   _   _                          _
 (_) (_) (_)                        (_)
 (_)  _  (_) _         _  _   _  _  (_) _
 (_) (_) (_)(_) _     (_)(_) (_)(_) (_)(_) _
 (_) (_) (_)   (_)  _ (_)  _ (_)    (_)   (_)
 (_) (_) (_)(_)(_) (_)(_) (_)(_)    (_)   (_).org

We are proud to finally announce libssh in version 0.5. It took a lot of
time to get this version stable and out. We have rewritten huge parts of
the libssh internals to be able to be completely async in future. The
whole network design passed from synchronous calls to an event-based
asynchronous system. We also welcomed Milo as a new developer in our
team. He is working on the server support and ssh_pki, which will
provide a complete API to manipulate SSH keys. We also have to thank
Oliver Stöneberg who tested 0.5 over the last months and sent a big
amount of patches, and Eric Bischoff who authored many pages of the
tutorial.

If you are new to libssh read The Tutorial[1] how to get started. Please
join our mailing list[2] or visit our irc channel[3] if you have questions.

You can download libssh 0.5.0 here[4]. For Windows binaries we suggest
to use our MSVC build [5] or the MSVC and MinGW binaries from the KDE
Windows project here [6]. Packages for Fedora and for openSUSE are
available here [7].

For the libssh team,

Aris

(Continue reading)

Picon

Re: libssh 0.5 released

congrats guys....great work and thanks :)

On Wed, Jun 1, 2011 at 4:51 PM, Aris Adamantiadis <aris@...> wrote:
>  _   _   _                          _
>  (_) (_) (_)                        (_)
>  (_)  _  (_) _         _  _   _  _  (_) _
>  (_) (_) (_)(_) _     (_)(_) (_)(_) (_)(_) _
>  (_) (_) (_)   (_)  _ (_)  _ (_)    (_)   (_)
>  (_) (_) (_)(_)(_) (_)(_) (_)(_)    (_)   (_).org
>
> We are proud to finally announce libssh in version 0.5. It took a lot of
> time to get this version stable and out. We have rewritten huge parts of
> the libssh internals to be able to be completely async in future. The
> whole network design passed from synchronous calls to an event-based
> asynchronous system. We also welcomed Milo as a new developer in our
> team. He is working on the server support and ssh_pki, which will
> provide a complete API to manipulate SSH keys. We also have to thank
> Oliver Stöneberg who tested 0.5 over the last months and sent a big
> amount of patches, and Eric Bischoff who authored many pages of the
> tutorial.
>
> If you are new to libssh read The Tutorial[1] how to get started. Please
> join our mailing list[2] or visit our irc channel[3] if you have questions.
>
> You can download libssh 0.5.0 here[4]. For Windows binaries we suggest
> to use our MSVC build [5] or the MSVC and MinGW binaries from the KDE
> Windows project here [6]. Packages for Fedora and for openSUSE are
> available here [7].
>
> For the libssh team,
(Continue reading)

Jan Willamowius | 1 Jun 2011 15:01
Face
Picon
Favicon

Re: libssh 0.5 released

Thanks to the whole team for all the work you put into this release!

-- 
Jan Willamowius, jan@..., http://www.gnugk.org/

Aris Adamantiadis wrote:
>   _   _   _                          _
>  (_) (_) (_)                        (_)
>  (_)  _  (_) _         _  _   _  _  (_) _
>  (_) (_) (_)(_) _     (_)(_) (_)(_) (_)(_) _
>  (_) (_) (_)   (_)  _ (_)  _ (_)    (_)   (_)
>  (_) (_) (_)(_)(_) (_)(_) (_)(_)    (_)   (_).org
> 
> We are proud to finally announce libssh in version 0.5. It took a lot of
> time to get this version stable and out. We have rewritten huge parts of
> the libssh internals to be able to be completely async in future. The
> whole network design passed from synchronous calls to an event-based
> asynchronous system. We also welcomed Milo as a new developer in our
> team. He is working on the server support and ssh_pki, which will
> provide a complete API to manipulate SSH keys. We also have to thank
> Oliver Stöneberg who tested 0.5 over the last months and sent a big
> amount of patches, and Eric Bischoff who authored many pages of the
> tutorial.
> 
> If you are new to libssh read The Tutorial[1] how to get started. Please
> join our mailing list[2] or visit our irc channel[3] if you have questions.
> 
> You can download libssh 0.5.0 here[4]. For Windows binaries we suggest
> to use our MSVC build [5] or the MSVC and MinGW binaries from the KDE
> Windows project here [6]. Packages for Fedora and for openSUSE are
(Continue reading)

Picon

multithreaded server issues

Hi guys,

I'm facing some issues with the libssh server that I'm putting
together. I'm using the latest libssh from the master. My code can be
found on pastebin at the link below. Also pasted below is the crash
report and what gdb has to about this.

The problem and how to reproduce:

If I make multiple X forwarding connections, and say x forward xeyes
and xcalc I get both the applications. Now if I simply just take one
of these windows and keep moving them around, I get a crash with the
following output.

This crash happens under other circumstances too but the above is a
sureshot way to trigger it.

To go through the server code:

Main thread :

- I am using gthreads for the threading and initialize gthread, call
ssh_threads_set_callbacks, ssh_init()

- I have a global ssh_session* (ssh_session is pointer to a pointer)
and I initiate this with a ssh_new (assuming this would allocate
memory).

- my ssh_bind and ssh_bind_listen is common for all ssh_sessions.

(Continue reading)

Picon

Re: multithreaded server issues

Hi again,

I've made further progress in my attempts to debug my server code.

I've increased the buffer size in copy_fd_to_chan from 4000 to 40000
and am reading slightly less than that. I also noticed that I had not
initialized the buffer.

Result:
The apps launched seem to be far more stable, even with 3 concurrent
connections :) I did have a crash after a lot of use - will study this
some more.

However this gives credence to my thought that it is something wrong
in my code (and/or my understanding so far) than libssh itself.

A question running though my mind yet though is if I should have
mutexes before reading from fd and then again while writing to the
channel or since each connection is a separate session and thread it
doesn't matter.

Thanks again for everything, any thoughts on any of the above and
general pointers on things I should be keeping in mind based on your
own experience would be appreciated.

Bye for now

On Sat, Jun 4, 2011 at 2:32 PM, jeetu.golani@...
<jeetu.golani@...> wrote:
> Hi guys,
(Continue reading)

Picon

HMAC error - help pls

Hi guys,

In continuation with my efforts to put together a libssh based server,
I have had significant success and can say it is very impressive to
see the effort you guys have put in the libssh library, thank you :)

I could sincerely use some help though. All in all my server is
behaving much more robust than it ever has. I have been testing with
multiple X client applications being forwarded simultaneously and all
in all it runs well. I had some previous issues I had mailed this list
about (subject: multithreaded server issues) but an init of the buffer
seems to have helped.

I have noticed some behaviour I do not understand. Below is what the
libssh log says when set to SSH_LOG_PACKET

With multiple applications, after extensive use of the applications
(for e.g. xeyes and xclock running) I have noticed that after sometime
the applications are unable to refresh their window - there is no
crash most of these times and if left alone maybe clock may eventually
refresh part of the window etc. xeyes stops showing it's eyes moving
around but still seems to be running - ssh client connected seems to
show some activity too.

The libssh log seems to suggest that there is packet corruption at
this point. Two things stand out from the below log:

I]

[3] Decrypting 16 bytes
(Continue reading)

Aris Adamantiadis | 7 Jun 2011 13:08
Picon
Gravatar

Re: HMAC error - help pls

Hi Jeetu,

I did not have much time to read your email completely, but it seems in
first impression that server/client is sending garbage. Could you attach
the first hundreds lines of debugging output, especially the key exchange ?
Also, do you have an estimation of the number of bytes that have been
transmitted before the failure ? (i.e. does it approach gigabytes ?)

Thanks,

Aris

Le 7/06/11 12:00, jeetu.golani@... a écrit :
> Hi guys,
> 
> In continuation with my efforts to put together a libssh based server,
> I have had significant success and can say it is very impressive to
> see the effort you guys have put in the libssh library, thank you :)
> 
> I could sincerely use some help though. All in all my server is
> behaving much more robust than it ever has. I have been testing with
> multiple X client applications being forwarded simultaneously and all
> in all it runs well. I had some previous issues I had mailed this list
> about (subject: multithreaded server issues) but an init of the buffer
> seems to have helped.
> 
> I have noticed some behaviour I do not understand. Below is what the
> libssh log says when set to SSH_LOG_PACKET
> 
> With multiple applications, after extensive use of the applications
(Continue reading)

Picon

Re: HMAC error - help pls

Hi Aris,

Thanks for replying.

Unfortunately I copy pasted only this part of the log, will reproduce
the error and paste the entire log.

As for an estimation on the amount of data, gauging that the packet
number above is 36519 and while most packets seemed to have a length
of 32bytes, I did see some packets with a length of 668bytes too
(about 10%).....am guessing approx 35 Megabytes of data.

For the ssh client I am using a standard openssh client, the server is
my own and creates a socket where an X client connects etc.

Sincerely need your help. Thanks and sorry for the trouble.

Bye for now

On Tue, Jun 7, 2011 at 4:08 PM, Aris Adamantiadis <aris@...> wrote:
> Hi Jeetu,
>
> I did not have much time to read your email completely, but it seems in
> first impression that server/client is sending garbage. Could you attach
> the first hundreds lines of debugging output, especially the key exchange ?
> Also, do you have an estimation of the number of bytes that have been
> transmitted before the failure ? (i.e. does it approach gigabytes ?)
>
> Thanks,
>
(Continue reading)

Aris Adamantiadis | 7 Jun 2011 21:19
Picon
Gravatar

Re: HMAC error - help pls

Hi Jeetu,

Watching the output more carefully, I notice this:
[3] Decrypting 16 bytes
[3] Decrypting 16 bytes

It looks like the 16 first bytes were decrypted twice. And that the 
following packets somewhat decrypted correctly.
The HMAC is the algorithm that verifies the integrity of the received 
data. Bad Hmac means there was a corruption, probably because of the 
double decrypt.
The double decrypt may have two sources:
1.  A bug in libssh makes it possible to have the decryption happening 
twice. To be verified
2. Socket operation happening in concurrency in two threads on the same 
session. Can be something as trivial as a ssh_poll().
How are you doing the multiplexing of the different sockets/servers ?

I will verify we are not in #1, could you see if you are not in #2 ?

Kr,

Aris

Le 07/06/11 13:22, jeetu.golani@... a écrit :
> Hi Aris,
>
> Thanks for replying.
>
> Unfortunately I copy pasted only this part of the log, will reproduce
(Continue reading)

Aris Adamantiadis | 9 Jun 2011 11:38
Picon
Gravatar

Re: HMAC error - help pls

Hi,

I have inspected the code path, there is no possibility for "decrypting
16 bytes" message to show up twice in a row. Are you using several
sessions ? If so, could you try again but with only one client ? I'm not
yet sure it's not a libssh problem so I prefer we investigate.

Kr,

Aris

Le 7/06/11 13:22, jeetu.golani@... a écrit :
> Hi Aris,
> 
> Thanks for replying.
> 
> Unfortunately I copy pasted only this part of the log, will reproduce
> the error and paste the entire log.
> 
> As for an estimation on the amount of data, gauging that the packet
> number above is 36519 and while most packets seemed to have a length
> of 32bytes, I did see some packets with a length of 668bytes too
> (about 10%).....am guessing approx 35 Megabytes of data.
> 
> For the ssh client I am using a standard openssh client, the server is
> my own and creates a socket where an X client connects etc.
> 
> Sincerely need your help. Thanks and sorry for the trouble.
> 
> Bye for now
(Continue reading)


Gmane