Skip to content
Advertisement

re-initialize / reconnect a terminal after network interruption

I have what is probably a very simple terminal related question. I’m running Ubuntu 8.10 Intrepid Ibex, using Gnome, and I often open a terminal-based ssh session only to have it dropped at some point later on. Once the session is dropped the terminal becomes unusable, obviously because the network connection has been dropped.

Is there a way to re-initialize the session, or even revert to a working local terminal?

Under Windows, using putty, when this happens I can right-click and select restart session, and do not need to open a new terminal, however under linux my lack of understanding on this subject has lead me to always close the defunct terminal, and restart a new one from scratch. I’d like to learn a new and useful trick if there’s one out there.

Also, I found the following post which is worded very similarly to mine,

Automatically (or more easily) reconnect to a screen session after network interruption reconnect-to-a-screen-session-after-network-interr

however, as far as I can tell, this is a different topic.

Advertisement

Answer

You want to use your SSH escape. By default it’s ‘~’, and ~. will terminate your connection.

The question you linked to is about screen, which is useful for resuming your remote session once you use the escape character to kill your local ssh process and reconnect.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement