In order to prevent this error after some time of inactivity you can do the following:
1- Open Putty and go to "Connection".
2- Change the "Seconds between keepalives" to a number higher than zero. 120 should be good.
3- Now go to Session and save as "Default Settings"
4- Done! Now every time you launch a SSH session with Putty, these settings will be used.
Comments welcomed!


