Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] SSH won't restart
Date: Mon, 10 Sep 2007 18:10:53
Message-Id: 49bf44f10709101054r13c8b7c4w90f0051ade528dcb@mail.gmail.com
In Reply to: Re: [gentoo-user] SSH won't restart by Stephen Wittig
1 > This process is the ssh daemon:
2 > root 2988 1 0 Sep04 ? 00:00:00 /usr/sbin/sshd
3 >
4 > Two things: before killing the process with the KILL signal, I would
5 > try killing it with TERM
6 > kill -TERM 2988
7 >
8 > If that doesn't work then kill the process with the KILL signal.
9 >
10 > I would also use:
11 > /etc/init.d/sshd restart
12 >
13 > This will give the init script a chance to do some cleanup work before
14 > restarting
15
16 Do this:
17
18 kill -TERM 2988 && /etc/init.d/sshd restart
19
20 and if that doesn't work, do:
21
22 kill -9 2988 && /etc/init.d/sshd restart
23
24 ?
25
26 - Grant
27
28
29 > > > I just upgraded ssh and when I try to restart I get:
30 > > >
31 > > > * Stopping sshd ... [ !! ]
32 > > >
33 > > > I don't see anything about it in '/var/log/sshd/current'. How can I
34 > > > figure out what is wrong? I'm a little nervous because I don't want
35 > > > to shut myself out of this remote server.
36 > > >
37 > > >
38 > > > I had a similar issue after a previous update to ssh when I went to restart
39 > > > it to get it to use the new binaries. One of the nice features of sshd is
40 > > > that your current session will say active even if you kill the sshd daemon
41 > > > process. Of course, if you get disconnected then you will not be able to
42 > > > log back in, so it's good to do what you need to quickly if you do need to
43 > > > kill (or if it's really stuck, kill -9) the process. When I had this
44 > > > problem I issued a `kill -9 PID_NUMBER && /etc/init.d/sshd start` - just be
45 > > > sure that you're killing the /usr/sbin/sshd process and not one of your sshd
46 > > > login forks at the same time.
47 > >
48 > > OK, I've got to be really careful here. I see the following processes
49 > > in 'ps -ef':
50 > >
51 > > root 2988 1 0 Sep04 ? 00:00:00 /usr/sbin/sshd
52 > > root 7573 2988 0 07:28 ? 00:00:00 sshd: root@pts/0
53 > >
54 > > Should I:
55 > >
56 > > kill -9 2988 && /etc/init.d/sshd start
57 > >
58 > > Are you sure? :)
59 > >
60 > > - Grant
61 --
62 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] SSH won't restart Stephen Wittig <nofx911@×××××.com>