Need your inputs on issue: stale sessions in openssh

RAVI PRATAP Singh singh.ravipratap88 at
Tue Apr 16 17:36:07 EST 2013

Hi Folks,

I am working on openssh-5.5p1.I am facing an issue in a scenario described

Client has established a ssh connection to the server.
Due to no activity at the client , the shell got killed once the timeout
As shell got killed , the server sends a close to client and waits for
receiving the ack from client.
But somehow, the client is not sending the close.
Now as per RFC, ssh process on server would get killed once it receives
close(ack) from client, so in this case,
server is waiting for the signal and thus the session got stale.

Could someone please suggest me what should I do for this case.

What I thought was if shell got killed due to timeout, the client can't do
anything , so the server should not wait for close(ack) from the client,
rather it just should get killed once it has sent the close to the client.
Another was to wait for some time and then get killed, but then we would
need to create a timer and maintaining timers for all ssh processes is not

Please provide your suggestions and help me in resolving this issue.
Thanks in advance.


More information about the openssh-unix-dev mailing list