Originally Posted by kdelover
Is any one aware of timeout option for rsh or ssh? I need it for a script.All i want is to to rsh\ssh a workstation and exit it from it after the mentioned time
Thanks for the help!
1. Read the user's inputs line by line and reset a counter at each entered line.
2. Have an interval timer increment the counter, read the result, and exit the session once the inactive time criterion is met.
To do this, you need threads, so Bash is out. Use Ruby, Python, something that supports threads and is reliable. The user would not see the interaction in any way out of the ordinary -- Ruby or Python would present the user's entries and the server's replies in the normal way.
It would be nice if the script provided a warning before unplugging the user, who might have started a long, critical process that shouldn't be interrupted.