Three methods for avoiding timeouts during SSH sessions.
Use Client-side methods if you have no admin rights on the SSH servers or do not what to alter server's settings. This methods consists in instructing the client to send a keep alive every specified interval.