Sunday, May 5, 2024
23
rated 0 times [  23] [ 0]  / answers: 1 / hits: 7590  / 2 Years ago, sun, june 26, 2022, 1:29:30

This is a very simple problem. I use gnome-terminal to SSH to other machines every day. I do this on a laptop which I carry around the office, so I am constantly switching between wired and wireless networks. When this happens my SSH sessions drops off and the terminal freezes.



Why does this happen (the freezing, not the session dropping) and is their a way to prevent it? I know I can get around this by logging off from the remote server before I know I want to disconnect my laptop from Ethernet.



It's annoying because I have to manually close the terminal session after it has frozen which pops up a dialogue box and I also lose the title of the session - all very time consuming. It would be much better if the ssh session just got killed and it returned me back to the local bash prompt.


More From » command-line

 Answers
2

The session will eventually time out and disconnect; this will happen faster if you configure ServerAliveInterval and ServerAliveCountMax in ~/.ssh/config. To force an immediate disconnect, Return~..


[#39125] Sunday, June 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
brellked

Total Points: 63
Total Questions: 107
Total Answers: 104

Location: Morocco
Member since Fri, May 22, 2020
4 Years ago
;