Subject: Re: keepalive support

Re: keepalive support

From: Simon Josefsson <simon_at_josefsson.org>
Date: Thu, 28 Jan 2010 14:36:57 +0100

If you rebuild libssh2 from git, and restart your sshd like this:

$ sudo /usr/sbin/sshd -d -o ClientAliveInterval=1 -d

(i forgot -d in the last e-mail, it makes it print some more useful
debugging info)

then my example code from the last e-mail will print:

debug2: channel 0: request keepalive_at_openssh.com confirm 1
debug1: Got 100/13 for keepalive
debug2: channel 0: request keepalive_at_openssh.com confirm 1
debug1: Got 100/14 for keepalive
debug2: channel 0: request keepalive_at_openssh.com confirm 1
debug1: Got 100/15 for keepalive
debug2: channel 0: request keepalive_at_openssh.com confirm 1
debug1: Got 100/16 for keepalive
debug2: channel 0: request keepalive_at_openssh.com confirm 1
debug1: Got 100/17 for keepalive
debug2: channel 0: request keepalive_at_openssh.com confirm 1
debug1: Got 100/18 for keepalive
debug2: channel 0: request keepalive_at_openssh.com confirm 1
debug1: Got 100/19 for keepalive
debug2: channel 0: request keepalive_at_openssh.com confirm 1
...

Replace 'sleep (1)' with 'usleep (300000);' in my ssh2.c example from
the last e-mail to make sure libssh2 responds before sshd sends another
request (not really required, but makes the output above look more
consistent).

OpenSSH no longer terminates sessions from libssh2 clients. Whoa!

There is more to work on though (i.e., GLOBAL_REQUEST), but I'll
followup on that later.

/Simon
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-01-28