FAQ:
Why do my ssh sessions die if left idle for several minutes?
ANSWER:
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