Disable SSH Timeouts [duplicate]

Possible Duplicate:
ssh terminal session times out, how can this be changed

When ever I connect to a server using SSH with multiple windows, few connections get closed. It is probably because of ideal time. I have followed through this blog https://www.simplified.guide/ssh/disable-timeout and its not working for me. I don't have permission the server to make changes. I there any way to disable or extend the connection time. I am using Ubuntu 11.04

Thank you


Solution 1:

You can add the following to your local /etc/ssh/ssh_config file (man ssh_config):

ServerAliveInterval 60

where 60 is in seconds. This will cause your client to send a message to the SSH server every 60 seconds which should keep the connection alive.

You can also use screen to open multiple terminals on one connection (apt-get install screen). A nice thing about screen is that you can disconnect from the server but your processes keep running and you can reconnect later using screen -R. I think this is the best way, personally.

If you had access to the server configs, you could also update the ClientAliveInterval in /etc/ssh/sshd_config on the server (man sshd_config).