Бывает так, что подключаешься по SSH к какому-либо серверу, но потом происходит потеря Интернета или сети и сессия зависает. И терминал не реагирует ни на какие клавиши. Рассказываем как отключиться от SSH сессии, которая зависла в этой записи.
Чтобы отключиться от зависшей SSH сессии достаточно нажать последовательно 3 нопки на клавиатуре: Enter + [ ~ ] + [ . ]
Итак, нажимаем Ентер, затем «тильда» (это Shift + [ ` ] ), затем «точка» и происходит отключение. Теперь можно заново подключиться по SSH.
Вот отрывок из man ssh что можно еще сделать:
ESCAPE CHARACTERS
When a pseudo-terminal has been requested, ssh supports a number of functions through the use of an escape character.
A single tilde character can be sent as ~ or by following the tilde by a character other than those described below.
The escape character must always follow a newline to be interpreted as special.
The escape character can be changed in configuration files using the EscapeChar configuration directive or on the command line by the -e option.
The supported escapes (assuming the default ‘~’) are:
~. Disconnect.
~^Z Background ssh.
~# List forwarded connections.
..... output trimmed
