We recently installed a Cisco ASA 5505 firewall where I work. Very powerful firewall, much too powerful for our needs, but oh well. The problem is that SSH connections from the inside to outside would timeout after 5 minutes. I think this was a problem with the NAT timeout settings, but I tried many, many different options with no success on the firewall. Then I discovered
ClientAliveInterval for the OpenSSH server. You put that in your sshd_config file and restart SSH. It should work like a charm.
Did this help you out? It took me a few days to piece together all this information together, I hope this saves you some time (who knows, maybe the future me will be thankful I wrote this down). Let me know your thoughts. email@example.com