Bash process hangs around forever after ssh disconnect

Michael Hipp
Mon Nov 24 09:29:00 GMT 2008

Thorsten Kampe wrote:
> * Michael Hipp (Sat, 22 Nov 2008 13:49:33 -0600)
>> I'm logging in to a W2k server via cygwin sshd and using Putty as my
>> terminal emulator. If my ssh connection gets dropped for any reason
>> the bash.exe process on the host just stays there forever. Also,
>> anything I was running in bash (e.g. vim) will stay there forever. I'm
>> having to use taskman to clean this up periodically.
>> Anything that can be done about this?
> You could check or set you the ClientAliveInterval and TCPKeepAlive. 
> I've set both to 0 respectively to no because I don't want sshd to kill 
> my session only because the client does not respond for a while. Use 
> "screen" to reconnect when the connection is back.

Thanks. I set these options as per the man page and after restarting the sshd 
service it has had no effect on the problem. Appears it may be more related to 
bash than sshd per this...

  - When the system is idle I have one (1) sshd.exe process (the service).

  - Once I log in remotely I have two (2) sshd.exe processes and one (1) 
bash.exe process.

  - When I force exit the client terminal emulator one of the sshd.exe 
processes goes away almost immediately. But the one bash.exe process is still 
there (even as much as hours or days later).

Appears there's some lack of understanding between sshd and bash.

Any ideas?


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list