Not cool SSH, not cool!
The error is due to an inactivity time out and is easily addressed. All you have to do is tell your SSH client to send a keep-alive packet every so often so that the SSH server will not disconnect you. To do that, edit your ~/.ssh/config file and make sure the following two lines are present:
That's all there is to it. After making those changes the next time you connect via SSH you will not be disconnected due to inactivity.