Balazs Scheidler <[EMAIL PROTECTED]> writes:

> As it seems not only lsh has problems, since ssh2 silently exits
> when lsh sends an SSH_DEBUG packet as the keyexchange finishes. As a
> workaround I commented that debug message out.

Ooops. If I remember correctly, lsh won't send that message unless it
is run with --debug. 
 
> A second problem in ssh2 it doesn't conform the spec again. The
> SSH_MSG_ACCEPT_SERVICE consists of only a single byte, where it should be:
> 
>   byte      SSH_MSG_SERVICE_ACCEPT
>   string    service name
> 
> Workaround added.

To bad ssh2 doesn't follow the spec. Under what conditions is this
workaround invoked? If we get any more of this, I guess we'll have to
add a generic "ssh2-compatibility" flag to the connection struct or
something like that.

> The last problem was that, for some reason lsh did not read its stdin when
> the session was initiated. A quick & dirty bugfix was to add the line:
> 
>       session->in->super.want_read = 1;
> 
> to do_client_io(). This should have been set in the do_send() handler, but
> it doesn't get called when communicating with ssh2. This may be caused by a
> bug in lsh's (or ssh2's) flow control implementation.

It may well be that this change is the right thing.

do_send() is called when a window_adjust message is received, or when
some channel related function returns LSH_CHANNEL_READY_SEND. The
former case usually doesn't happen at channel start, if the
CHANNEL_OPEN or CHANNEL_OPEN_CONFIRMATION message already contains a
non-zero window size (That's probably what happens with ssh2. Check
the CHANNEL_OPEN_CONFIRMATION debug output to be sure). And I'm trying
to get away from the latter case; the current (non-working) code in
the cvs doesn't use LSH_CHANNEL_READY_SEND anywhere. In general, I'm
moving away from the LSH_* status codes in favor of exceptions.

> Now I could log in to an ssh2 server using the lsh client. It's a great
> feeling :)

Great!

> I have created an unofficial snapshot with this patch applied. You can find
> it at
> 
> http://www.balabit.hu/downloads/lsh/lsh-0.1.4-bazsi.tar.gz

Kewl!

BTW, talking about specs, I read the latest secsh drafts some day
ago, and also diffed them to the previous version. It seems that most
of the ambiguities about formatting various objects have been cleared
up. After a quick look at the relevant parts of lsh, I think it agrees
with the new draft. IIRC, the "transport" draft was the only one which
included non-trivial changes.

/Niels, from Oslo

Reply via email to