Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Sep 2005 14:56:47 -0700
From:      Sean Murphy <smurphy@calarts.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: 5.4 SSH Timeout help
Message-ID:  <4325F99F.2090505@calarts.edu>
In-Reply-To: <20050912185417.GB30659@localhost.localdomain>
References:  <4325C7D3.7060409@calarts.edu> <20050912185417.GB30659@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4325F99F.2090505>