You are here: CLASSE Wiki>Computing Web>SshTimeout (12 Apr 2022, admindo-dab66)Edit Attach


Why do my ssh sessions die if left idle for several minutes?


Nothing on the CLASSE network should have a timeout that short, so our first guess at a cause would be that you have a home network with a NAT router, and the aging time for the address translation table in your router is too short. If so, the preferred solution would be to raise the timeout, but some NAT appliances do not support configuring this. If that isn't possible, a workaround would be to cause some traffic on the session every few minutes. Our preferred solution would be to add ServerAliveInterval 60 to ~/.ssh/config on your remote system. If you are forwarding X11, running something like "xclock" or "oclock" would also work.

In addition, we'd highly recommend using something like tmux so that you can re-connect to a terminal even if your connection drops. Once you log in, you can run tmux, and if disconnected, you log in again and type tmux attach. Please see man tmux for more options.

Back to: ComputingFAQ
Topic revision: r3 - 12 Apr 2022, admindo-dab66
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback