Disable SSH Timeouts

11,544

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).

Share:
11,544

Related videos on Youtube

Mohd Shakir Zakaria
Author by

Mohd Shakir Zakaria

Updated on September 18, 2022

Comments