Hi,
I continued to inspect the incompatibilties between ssh2 & lsh. The
keyexchange now works fine (I made an error when corrected the kludge
<grin>) 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.
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.
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.
Now I could log in to an ssh2 server using the lsh client. It's a great
feeling :)
Doing the reverse (connecting ssh2 to lshd) caused basically the same
problems (SSH_MSG_SERVICE_ACCEPT, debug message), but with the patch below
it works 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
Have fun!
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
url: http://www.balabit.hu/pgpkey.txt