OpenSSH daemon(sshd) by default will cut client off if the client has been idled for some period.
There are basically two kinds of solutions, one is from client side. The client can send a dummy packet to ssh server periodically to avoid being recognized as 'idle'. Some ssh client already has this functions built-in, e.g. openssh in Debian and putty. If you are using default openssh client, you probabaly have to patch it with this fuction.
Another approach is obviously from server side, the sshd. This will only be possbile if you have root priviledge on the server. Because you need to modify the configruration file for sshd, which is /etc/ssh/sshd_config in RedHat Linux.
Uncomment the following two lines.
ClientAliveInterval 60
ClientAliveCountMax 120
This enable the sshd to send a message to the client every 60 sec to request a response. The sshd wont cut the client off untill 120 messages have been sent to the client and no response was received.
Note that, the response from client is done by the client program automatically, user on client side doesnt know these details at all.
Strictly speaking, this is not a good solution, becaue the server will not disconnect the user untill 2 hours after the user has disconnect himself anormally, e.g. close the terminal without loging out. But this solution avoids the client been cut off simply because of idle status.
More details available at man page of sshd_config:
man sshd_config