Are you using the bash shell? (the default in debian)
If so, you can check the value of the TMOUT-variable by command
If it is set, you can unset it by saying
To make the setting permanent, put that line into the "~/.bash_profile".
If the TMOUT-variable is not set, and it still kicks you out, you have some other problem.