Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSH auto log out

Status
Not open for further replies.

gary2

IS-IT--Management
Jun 26, 2003
10
0
0
US
Is there a setting to automatically log off disconnected sessions after a certain time?
 
As far as I know, there is no such facility in Solaris (8 & 9) or in Compaq/HP Tru64. But it wouldn't be particularly difficult to write a script that checks the activity (or lack of it) of logged in users and kills their process after a pre-determined period of inactivity.

I hope that helps.

Mike
 
Hi Gary,
When using ksh or bash you may use the environment variable TMOUT to timeout idle shells (tried on AIX and RH-Linux):
Code:
export TMOUT=<idleTimeInSeconds>
ksh on AIX warns you and gives extra 60 seconds after that warning, bash on Linux terminates after that time.
You may put that setting in the profile needed (global or user).
This solution is not restricted to SSH - it should quit telnet'ed shells too.

Stefan
 
Thanks for the replies!

The issue is not really the idle times but the connection dropping. When the internet connection drops (or bounces) the connection is terminated but the remote user is stilled logged in the system. When they go back to log in, the system considers that log in already in use and prompts for an alternative log in (which they do not have). They then must have someone kill their log in before they can log back in.

This SCO 5.06 Enterprise using Anzio for the client.

Is there a way to automatically kill the log in when the connection is dropped?

Is the a setting to increase the tolerence for a dropped connection? It seems to tolerate about 1500 to 2000ms before they get kicked out.

Thanks!
 
If your users are going through a firewall, check the settings there. On some firewalls there can be a timeout setting where it will drop the connection after a certain amount of time passes with no traffic.

I'm not a network guy, but we had a similar issue and it was fixed by tweaking the firewall settings.

Hope this helps.
 
Thanks Sambones but Anzio has a keep alive setting that sends a null packet at user defined intervals which is set at 10 seconds. Firewalls are certainly a major source of problems though.

FYI, Anzio is the best Unix client on the market in my opinion. It has a print feature that passes of an ascii print job to windows for printing and automaically compresses the width. It also can create a PDF file instead of printing to paper. It also supports ssh. Sorry for the promo but I am really impressed with it after installing it on several hundred PC's.

Anyway, I have found info that indicates there are settings in the Windows/client registry that control tcp/ip conditions such as max resend of data before disconnect. I am going to play with those and see if I can delay the disconnect time a little to compensate for internet problems.

Again, thanks for the replies guys!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top