Preventing Ubuntu SSH Sessions From Timing Out

Have you ever been side tracked whilst logged into a remote server via SSH, only to find when you returned your session had timed out? A one line addition to the ssh_config can prevent this from being an issue.

Simply open a terminal window on your Ubuntu machine and type:

sudo pico /etc/ssh/ssh_config

And add the line:

ServerAliveInterval 60

Then save your changes, this change will send a small "keep-alive" packet to the server every 60 seconds, making it think that the connection is actively being used, so your connection will no longer time out due to inactivity.

Vote Result

----------
Score: 0.0, Votes: 0

Back to top