Each time I'm connecting to a remote server via SSH and loosing the connection, either I wait for a very long time until getting back the prompt, or I just close the terminal tab and open a new one.
Is it possible to force ending such frozen remote connection ?
CodePudding user response:
Type ~.
in the stuck ssh terminal.
Note that it needs to be the first thing on a line so if you’ve already typed something in there, press enter
first.
Edit: this answer from 11 years ago has more details on the SSH control sequences available.