Hi All,<div>Here is an interesting (but inconvenient) problem I&#39;ve found with dbclient when connected to an OpenSSH server that uses the keepalive (ClientAliveInterval &amp; ClientAliveCountMax).</div><div><br></div><div>
I have a OpenSSH server that sends keepalive messages to the client every 10 seconds and consider the client disconnected after 2 failed attempts.</div><div><br></div><div>On my client I use dbclient (latest version 0.52) to start a connection (using a private key with no password) to setup some tunnels (local &amp; remote).</div>
<div>So far so good. When I launch the dbclient from a shell everything is fine, this is what I see on the server log every 10 seconds:</div><div><br></div><div><div>debug2: channel 1: request <a href="mailto:keepalive@openssh.com">keepalive@openssh.com</a> confirm 1</div>
<div>debug1: Got 100/10 for keepalive</div><div>debug2: channel 1: request <a href="mailto:keepalive@openssh.com">keepalive@openssh.com</a> confirm 1</div><div>debug1: Got 100/11 for keepalive</div><div>...</div></div><div>
and the server keep maintaining the connection with the client.</div><div><br></div><div>Unfortunately, when I invoke my bourne shell script (that I use as wrapper for launching dbclient) from the init script (/etc/init.d/myWrapper.sh), everything SEEMS to work fine, but when the server sends keep alive messages, the dbclient doesn&#39;t seem to respond correctly.</div>
<div>This is what I see from the server&#39;s log:</div><div><br></div><div><div>debug2: channel 1: request <a href="mailto:keepalive@openssh.com">keepalive@openssh.com</a> confirm 1</div><div>debug2: channel 1: almost dead</div>
<div>debug2: channel 1: gc: notify user</div><div>debug1: session_by_channel: session 0 channel 1</div><div>debug1: session_close_by_channel: channel 1 child 18881</div><div>debug1: session_close_by_channel: channel 1: has child</div>
<div>...</div><div>Disconnecting: Timeout, your session not responding.</div><div>debug1: do_cleanup</div><div>debug1: do_cleanup</div></div><div><br></div><div>Does anybody have an idea why ?</div><div>It has something to do with I/O probably or some settings that are available when I launch my script (or the dbclient) from an interactive session but is missing when is invoked from the init script...</div>
<div><br></div><div>Regards,</div><div>fabrizio</div><div><br></div>