When my laptop was behind my NAT router, SSH would disconnect after a few minutes of inactivity. I added the following to my .ssh/config file.
# This is Russell's attempt to stop ssh connections from ending when # behind a firewall. ServerAliveInterval=300
This seems to fix the problem.