5.4 SSH Timeout help

Sean Murphy smurphy at calarts.edu
Mon Sep 12 14:56:08 PDT 2005


Will Maier wrote:
> On Mon, Sep 12, 2005 at 11:24:19AM -0700, Sean Murphy wrote:
> 
>>I SSH into the server with no problem and I'm able to do work
>>however when I walk away from my desk SSH closes the session.  It
>>seems the timeout is 5 or 10 min how can I change this setting for
>>all of our users?
> 
> 
> What shell are the users using? If they're using 'tcsh' or certain
> other shells, they might be running up against the shell's
> autologout option. See the man page for tcsh (1):
>     
> |  The first word is the number of minutes of inactivity before
> |  automatic logout. The optional second word is the number of minutes
> |  of inactivity before automatic locking. When the shell
> |  automatically logs out, it prints `auto-logout', sets the variable
> |  logout to `automatic' and exits. When the shell automatically
> |  locks, the user is required to enter his password to continue
> |  working. Five incorrect attempts result in automatic logout. Set to
> |  `60' (automatic logout after 60 minutes, and no locking) by default
> |  in login and superuser shells, but not if the shell thinks it is
> |  running under a window system (i.e., the DISPLAY environment
> |  variable is set), the tty is a pseudo-tty (pty) or the shell was
> |  not so compiled (see the version shell variable). See also the
> |  afsuser and logout shell variables.
> 
There was no timeout option with the shell I was using (the bourne shell 
/bin/sh)  However I did find the problem.  The router was timing out NAT 
translations after 10 min of no packets transversing.  This corresponded 
to my timeout.  I fixed the problem by editing the /etc/ssh/sshd_config

Uncommenting the line

ClientAliveInterval 300

and restarted sshd

This fixed my problem.

Thanks


More information about the freebsd-questions mailing list