Im connecting to a server using Putty. I have a connection time-out every 2 minutes if I don't use it. I don't have the same issue while connecting from my office network using the same laptop.
Seconds between keepalives
Check your SSH servers settings. It sounds like it's disconnecting you if there is inactivity after a set period of time. This are typically the settings you need to play with:
They're in the file
The server is probably not disconnecting you, it is most likely a router between you and your server, which explains why on different networks (especially the same network as the server) you don't have an issue.
You can fix this on the server side by adding
On the client side you can check