1 under linux ssh command: vim / etc / ssh / ssh_config
Then find inside ServerAliveInterval parameters, if you do not own the same plus a fine. Meaning the same parameters, it is the number of seconds, such as 9 minutes:
ServerAliveInterval 540
Both methods of putty SSH connection timeout in solution
2 Putty
Enable putty keepalive
putty -> Connection -> Seconds between keepalives (0 to turn off), default is 0 to 60.