in reply to Re: Can't Break Out of SSH Shell
in thread Can't Break Out of SSH Shell

It hangs from the command line also. How about running something like: ps -ef | grep -v grep |grep "ssh 192.168.2.3" saving the results to a hash and then perform a kill on the pid? But can you spawn a new shell while waiting for the ssh connection to close? I let it site for about 5 minutes and it still isn't timing out.

Replies are listed 'Best First'.
Re: Re: Re: Can't Break Out of SSH Shell
by dws (Chancellor) on Jun 08, 2001 at 08:46 UTC
    If ssh also hangs from the shell, chances are good that the local TCP stack isn't seeing that the socket is closed (because it isn't, as far as the TCP stack is concerned, since no FIN packet ever arrives).

    Try rigging script on the far side that forks and exits in the parent process, while the child sleeps a few seconds and then drops the interface. When the parent process exits, sshd should close the socket.