Add this to you /etc/ssh/ssh_config
ServerAliveInterval 270
That should take care of it.
Reason is the thing doing the "interconnection" is killing it.
Most consumer grade routers/firewalls/switches have a timeout of 5 minutes for idle session timeout.
Its stupid and something that ticks me off all the time, since I have to explain to customers why we aren't the ones killing off their SSH sessions.