Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 43
    This answer appears to me to more accurately answer the question, and in any case, was the answer I was looking for. Commented Dec 2, 2012 at 5:06
  • Note that you need to uncomment the line EscapeChar ~ in /etc/ssh/ssh_config (or ~/.ssh/ssh_config if you prefer). Commented Aug 3, 2013 at 6:19
  • 1
    @CoatedMoose The question title asks for ways to avoid ssh connection timeout; this is a way to terminate the connection after it has frozen. It's a very useful trick, but not a more accurate answer to the question. Commented Apr 5, 2015 at 12:57
  • 2
    @Mark the question asks "is there a way to prevent regain the terminal from ssh connections that have timed out?" Emphasis mine. Commented Apr 7, 2015 at 18:55
  • 3
    Eventhough it was incorrect in the context of the question, this is exactly what I wanted. Commented Apr 28, 2016 at 12:37