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 ) id 1IUCP9-0002Mi-NI for garchives@archives.gentoo.org; Sun, 09 Sep 2007 02:20:08 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l892BHTY025490; Sun, 9 Sep 2007 02:11:17 GMT Received: from sccrmhc14.comcast.net (sccrmhc14.comcast.net [63.240.77.84]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l8925GpJ017868 for ; Sun, 9 Sep 2007 02:05:16 GMT Received: from spore.ath.cx ([24.245.14.14]) by comcast.net (sccrmhc14) with ESMTP id <2007090902051501400rigmue>; Sun, 9 Sep 2007 02:05:15 +0000 Received: from pascal.spore.ath.cx (pascal.spore.ath.cx [192.168.1.100]) by spore.ath.cx (Postfix) with ESMTP id 081CB2E355 for ; Sat, 8 Sep 2007 21:05:10 -0500 (CDT) Date: Sat, 8 Sep 2007 21:05:10 -0500 From: Dan Farrell To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] SSH won't restart Message-ID: <20070908210510.636c35c7@pascal.spore.ath.cx> In-Reply-To: <200709082250.20774.wonko@wonkology.org> References: <49bf44f10709080840k4f64df08r1f3ba9a4e3b4f031@mail.gmail.com> <46E2E590.8030207@usa.net> <200709082250.20774.wonko@wonkology.org> Organization: Spore, Ltd. X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.13; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: ca41039e-851f-46c0-989c-9109894079a7 X-Archives-Hash: 6566b1d4047078b43be9ce5e142ce363 On Sat, 8 Sep 2007 22:50:20 +0200 Alex Schuster wrote: > 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 Don't forget that you could potentially test out the new server on a different port, and then if you can log in there you can use that connection to kill the other sshd, and then you can restart the normal sshd, and then kill the temporary sshd. I recommend this method highly as it gives you another way to get in should something go wrong. Just remember not to 'killall sshd'! -- gentoo-user@gentoo.org mailing list