S
S
Sergey c0re2019-11-24 16:41:32
linux
Sergey c0re, 2019-11-24 16:41:32

The SSH client hangs when the connection is broken. How to "unfreeze" it?

Good to everyone

ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.8, OpenSSL 1.0.2g  1 Mar 2016

when there is an interruption with the Internet, either ADSL or WiFi, then the SSH client hangs stupidly and does not respond to either Ctrl + C or Ctrl + D
, you have to kill the terminal window.
How to solve this problem?
PS: is it possible to make it reconnect automatically?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lynn "Coffee Man", 2019-11-24
@erge

man ssh
/Escape Characters
~. Disconnect.

S
Sanes, 2019-11-24
@Sanes

https://putty.org.ru/download.html can remember passwords after session restart.

P
pfg21, 2019-11-24
@pfg21

as an option, add to saving the ssh session when the connection is broken.
Host *
KeepAlive yes
ServerAliveInterval 60
when reconnecting, a new ssh session and a new console session are created and it is not possible to connect to the old console session.
if dumps are long in time, then put tmux, it can save the console session between breaks and you can even disconnect from a session on one computer and connect to the same console session on another.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question