Last Updated: February 25, 2016
·
644
· andersbrownwort

ssh keepalive

Frequently my ssh TCP sessions are canceled by overly zealous NAT / VPN setups. Adding this to your ~/.ssh/config

Host *
  ServerAliveInterval 60

tells ssh to send a no-op packet to the server once every 60 seconds.

More permanently, this can be added to /etc/ssh/ssh_config for system-wide support:

ServerAliveInterval 60