I have a SSH session with a VM running on Amazon AWS.One of the programs I had run hung up and froze the SSH terminal.So I hit Enter+~+.Now when I am trying to connect to my machine it says connection timed out.Does this mean that connection was only terminated from the clientside and is still active on server? If so how do I create a newconnection?Ctrl+C does not work on a SSH shell. Does this mean it is notpossible to terminate the hung up command without terminating theSSH session?
How to terminate a hung process in SSH?
shell;ssh
You can send a SIGSTOP to the process (most shells use Ctrl-Z for this), which will tell the present process pause it's current state. This should then return you to your shell command prompt. You can then see what jobs are paused with the jobs command and then kill the process with the kill command. If the process is number 1 in the list of the output of jobs then you would issue kill -TERM %1 (and check it has gone with jobs once more). You may have to send a SIGKILL instead (kill -KILL %1).A simple guide to job control can be found at:http://en.wikibooks.org/wiki/A_Quick_Introduction_to_Unix/Job_Control