Keep SSH connection open
» Articles / Code » Server Configuration » Keep SSH connection open
Many home and office routers kill "idle" connections after a certain length of time, forcing you to log in again. From an ISP's point of view this is understandable, but imho it's just annoying to loose a connection when you just went for a coffee and forget to be back in time.
A one-line addition to the end of the client's SSH configuration file (found at /etc/ssh/ssh_config in many systems) can fix this:
ServerAliveInterval 180
That should send a little ping out every three minutes to ensure the connection is kept alive. This tip should work on most OpenSSH servers that allows access to its sshd_config file. Just make sure you close your connection if you really don't use it for some time.
Post your comment
Comments
No one has commented on this page yet.
RSS feed for comments on this page | RSS feed for all comments