From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-69161-garchives=archives.gentoo.org@gentoo.org>)
	id 1IU7Tq-0006O6-Il
	for garchives@archives.gentoo.org; Sat, 08 Sep 2007 21:04:38 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l88KuXjh014473;
	Sat, 8 Sep 2007 20:56:33 GMT
Received: from mail.askja.de (mail.askja.de [83.137.103.136])
	by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l88KoOMv005944
	for <gentoo-user@lists.gentoo.org>; Sat, 8 Sep 2007 20:50:24 GMT
Received: from xdsl-213-196-193-37.netcologne.de ([213.196.193.37] helo=zone.wonkology.org)
	by mail.askja.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.67)
	(envelope-from <wonko@wonkology.org>)
	id 1IU7G4-0005Pq-0Y
	for gentoo-user@lists.gentoo.org; Sat, 08 Sep 2007 22:50:24 +0200
Received: from weird.wonkology.org (weird.wonkology.org [::ffff:192.168.1.4])
  by zone.wonkology.org with esmtp; Sat, 08 Sep 2007 22:50:21 +0200
  id 0003022C.46E30B0D.00004670
From: Alex Schuster <wonko@wonkology.org>
Organization: Wonkology
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] SSH won't restart
Date: Sat, 8 Sep 2007 22:50:20 +0200
User-Agent: KMail/1.9.7
References: <49bf44f10709080840k4f64df08r1f3ba9a4e3b4f031@mail.gmail.com> <46E2E590.8030207@usa.net>
In-Reply-To: <46E2E590.8030207@usa.net>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200709082250.20774.wonko@wonkology.org>
X-Archives-Salt: 434432c5-a2f8-4f08-be55-a95797400906
X-Archives-Hash: ad516b52111400b6a979597096a4a192

Josh Cepek writes:

> I had a similar issue after a previous update to ssh when I went to
> restart it to get it to use the new binaries.  One of the nice features
> of sshd is that your current session will say active even if you kill
> the sshd daemon process.  Of course, if you get disconnected then you
> will not be able to log back in, so it's good to do what you need to
> quickly if you do need to kill (or if it's really stuck, kill -9) the
> process.  When I had this problem I issued a `kill -9 PID_NUMBER &&
> /etc/init.d/sshd start` - just be *sure* that you're killing the
> /usr/sbin/sshd process and not one of your sshd login forks at the same
> time.
>
> Alex Schuster wrote:
> > If you think the upgrade is necessary and don't want to wait until you
> > or s.o. else has physical access in case sshd doesn't come up again,
> > you could
> > try to restart sshd manually by issuing a "kill -SIGHUP $( pidof sshd
> > )".
>
> I don't recommend doing this as it will also kill your current ssh
> session.  If for some reason the SIGHUP doesn't take correctly on the
> listening daemon you will find yourself locked and kicked out of the
> server.  Use top or htop to determine the actual PID of the daemon only.

Oh, whoops! Big mistake, you are right - sorry for that, this was bad 
advice. I did not think about these other sshd processes. Thanks for being 
watchful and pointing this out.
Still, I would prefer -HUP instead of -9, as this would make the sshd server 
restart itself. Just in case /etc/init.d/sshd start also makes trouble - it 
really shouldn't, but neither should /etc/init.d/sshd stop.

	Alex
-- 
gentoo-user@gentoo.org mailing list