From owner-freebsd-questions Mon Jun 17 18:40: 5 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id EF40437B43F for ; Mon, 17 Jun 2002 18:39:38 -0700 (PDT) Received: (from dan@localhost) by dan.emsphone.com (8.12.3/8.12.3) id g5I1cr5q018579; Mon, 17 Jun 2002 20:38:53 -0500 (CDT) (envelope-from dan) Date: Mon, 17 Jun 2002 20:38:53 -0500 From: Dan Nelson To: "Philip J. Koenig" Cc: questions@FreeBSD.ORG Subject: Re: kicking users Message-ID: <20020618013853.GB6214@dan.emsphone.com> References: <20020618013550.GA6214@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020618013550.GA6214@dan.emsphone.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Jun 17), Dan Nelson said: > In the last episode (Jun 17), Philip J. Koenig said: > > I've had trouble killing logins manually that way, although I admit > > that I've been using a plain 'kill' command, not 'kill -9'. > > > > Where I need to do this most often is for SSH users whose sessions > > time out due to connectivity problems. I kill their processes and > > shell, but the login still just sits there for a really long time > > (hours? days? .. in 'who' anyway) before it goes away. > > If you kill -9 sshd, it doesn't get a chance to clean up the login > records. Try just kill -9'ing the user's shell. > > You can also force the connections to time out all by themselves by > setting net.inet.tcp.always_keepalive=1 in /etc/sysctl.conf. That'll > force the kernel to send an empty packet after a TCP socket has been > idle for a couple of hours. If the packet isn't acked, the kernel > closes the socket. Hmm. According to the sshd manpage, it already enables keepalives. Ignore my sysctl idea, then. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message