Gentoo Archives: gentoo-user

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

Replies

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