From owner-freebsd-questions Mon Jan 14 8:24:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from clink.schulte.org (clink.schulte.org [209.134.156.193]) by hub.freebsd.org (Postfix) with ESMTP id 0105A37B41A for ; Mon, 14 Jan 2002 08:22:26 -0800 (PST) Received: from schulte-laptop.nospam.schulte.org (nb-65.netbriefings.com [209.134.134.65]) by clink.schulte.org (Postfix) with ESMTP id 8FA5B243C1; Mon, 14 Jan 2002 10:22:24 -0600 (CST) Message-Id: <5.1.0.14.0.20020114101809.04018490@pop3s.schulte.org> X-Sender: (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 14 Jan 2002 10:21:47 -0600 To: "Mike Meyer" , Brian T.Schellenberger From: Christopher Schulte Subject: Re: Restarting a service Cc: questions@freebsd.org In-Reply-To: <15426.65401.224226.567679@guru.mired.org> References: <71952277@toto.iv> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 At 09:55 AM 1/14/2002 -0600, Mike Meyer wrote: > > killall -HUP sshd > > > > should do it. > > > > (killall is basically ps -aux | grep | kill all wrapped up into a neat > > automated package for you) > >I thought about pointing that out, but for sshd it's a bad >idea. Unless you want to log off everyone logged in via ssh at the >same time, that is. Use lsof ( /usr/ports/sysutils/lsof ) and HUP only the listening sshd process. # lsof -i tcp:22 | grep LISTEN sshd 89005 root 4u IPv4 0xcd88ab60 0t0 TCP *:ssh (LISTEN) # killall -HUP 89005 > -- >Mike Meyer http://www.mired.org/home/mwm/ >Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. --chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message