Apple, Linux, SSH, Terminal, Timeout Stop OS X Terminal SSH Timeout


There are three ways to do this using the ServerAliveInterval to send data along every few seconds. Replace the “10” with the number of seconds between pings.

From least to most global:

1. Add the option on the command line:

ssh -o ServerAliveInterval=10

2. Add the option to your personal ssh config by creating/editing ~/.ssh/config:

# This is ~/.ssh/config
# For all hosts
ServerAliveInterval 10
# For a selection of hosts
  ServerAliveInterval 10

3. Add the option to the system-wide ssh config by editing /etc/ssh_config. (Syntax the same as above.)