Re-initialization / reconnection of terminal after network interruption

I have probably a very simple question related to terms. I run Ubuntu 8.10 Intrepid Ibex using Gnome, and I often open the ssh terminal just so that it crashes at some point later. After the session ends, the terminal becomes unusable, obviously, because the network connection has been disconnected.

Is there a way to reinitialize a session or even return to a working local terminal?

On Windows, using putty when this happens, I can right-click and choose to restart the session, and I don’t need to open a new terminal, however on Linux I don’t understand this subject led me to always close the non-existent terminal and restart the new one with zero. I would like to learn a new and useful trick if there is.

Also, I found the following message, which is written very similar to mine,

stack overflow session after network interr

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

+4
source share
2 answers

You want to use your SSH output . By default it is '~' and ~. will terminate your connection.

The question you're connected to is the screen, which is useful for resuming your remote session when you use the escape character to kill your local ssh process and reconnect.

+5
source

Use ~. first ~. to disconnect your ssh connection locally. This returns you to a working local terminal. You can also use another terminal to destroy the corresponding ssh command.

To preserve your remote state, you must use screen , as suggested earlier.

I recently learned about mosh , which is an interesting, renewable UDP wrapper client. It uses ssh to initialize the connection and may need a mosh installed on the server (and UDP access between the client and the server), however, it can be restored after disconnections and IP changes of the client.

+4
source

Source: https://habr.com/ru/post/1286533/


All Articles