Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Mac, but I don't know if this matters. Anyway:

  1. In Terminal, do SSH to a remote host.
  2. Close lid. (The network connection is cut off at this point).
  3. Wait. Open lid again.

Some times, the terminal still thinks it's connected to the remote host and the cursor is inanimate.

How can I end the remote connection and regain control over my parent shell? Pressing Ctrl+C does nothing.

share|improve this question

It should be possible to either terminate the connection by typing ~., or to kill the "dead" ssh program by typing ~Ctrl+z, ~ being the special character to "escape" the following control sequence, and Ctrl+z then sends the ssh process to the background. Then you can kill it with kill %1.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.