Preventing ssh timeouts

~/.ssh/config

Host <your name for the remote server>
    HostName <the server's address>
    ServerAliveInterval <time, e.g. 120 = 2 minutes>

References: