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

Replies

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