The option -o ServerAliveInterval=60
tells the SSH agent to keep sending “pings” to keep the connection alive.
Example below.
ssh -v -o ServerAliveInterval=60 myname@myhost.com
Alternatively you can add it the your ssh config file for all hosts:
Host *
ServerAliveInterval 60