Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2002 10:21:47 -0600
From:      Christopher Schulte <schulte+freebsd@nospam.schulte.org>
To:        "Mike Meyer" <mwm-dated-1011455737.3e0c77@mired.org>, Brian T.Schellenberger <bts@babbleon.org>
Cc:        questions@freebsd.org
Subject:   Re: Restarting a service
Message-ID:  <5.1.0.14.0.20020114101809.04018490@pop3s.schulte.org>
In-Reply-To: <15426.65401.224226.567679@guru.mired.org>
References:  <71952277@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help

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
>--
>Mike Meyer <mwm@mired.org>                      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




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