I have had to turn on ClientAliveInterval=20 in my /etc/ssh/sshd_config file (Linux). This causes sshd to send 3 requests (one every 20 seconds) to an inactive client. If no response after all 3, it disconnects. Winscp gives this error:
Server sent disconnect message
type 2 (SSH_DISCONNECT_PROTOCOL_ERROR):
"Timeout, your session not responding."
I have tried having winscp send keepalives and dummy commands from its configuration, but neither helps.
If you want to add support for ClientAliveInterval to winscp, I can set you up to connect to a server that is configured this way. Thanks very much -- I love winscp.