View previous topic :: View next topic |
Author |
Message |
jonnevers Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/182916767547279b4f55dc0.png)
Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Mon Jan 28, 2008 5:17 pm Post subject: [SOLVED] sshd: can't restart |
|
|
I just updated to net-misc/openssh-4.7_p1-r3 and I cannot restart the service:
Code: | host root # /etc/init.d/sshd restart
* Stopping sshd ... [ !! ]
host root # |
what about manually?
Code: | host root # start-stop-daemon --stop --exec "/usr/sbin/sshd" --pidfile "/var/run/sshd.pid"
No /usr/sbin/sshd found running; none killed. |
system status?
Code: | host root # cat /var/run/sshd.pid
11995
host root # file /usr/sbin/sshd
/usr/sbin/sshd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), stripped
host root # ls -lh /usr/sbin/sshd
-rwxr-xr-x 1 root root 352K Jan 28 09:29 /usr/sbin/sshd
host root # ps -ef | grep -i ssh
root 9610 11995 0 12:07 ? 00:00:00 sshd: user [priv]
user 9612 9610 0 12:07 ? 00:00:00 sshd: user@pts/2
root 9981 9631 0 12:16 pts/2 00:00:00 grep --colour=auto -i ssh
root 11995 1 0 2007 ? 00:00:04 /usr/sbin/sshd
root 17443 11995 0 00:00 ? 00:00:00 sshd: user [priv]
user 17445 17443 0 00:00 ? 00:00:03 sshd: user@pts/1
host root # |
everything looks ok to me? any suggestions besides manually kill the daemon (since I am currently remote)?
Last edited by jonnevers on Mon Jan 28, 2008 9:56 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Mon Jan 28, 2008 5:30 pm Post subject: |
|
|
Kill the daemon. Leave the remote connections alone and you'll be fine. I generally log in from a second remote session to be sure. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
StarDragon Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/3299116104950506c928ca.jpg)
Joined: 19 Jun 2005 Posts: 390 Location: tEXas
|
Posted: Mon Jan 28, 2008 6:42 pm Post subject: |
|
|
What about Code: | cat /var/log/messages |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
coolsnowmen Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/2048126856430177a506846.gif)
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Mon Jan 28, 2008 7:55 pm Post subject: |
|
|
after killing the sshd process, you might need to zap the service to restart it
Code: |
/etc/init.d/sshd zap
/etc/init.d/sshd start |
_________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jonnevers Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/182916767547279b4f55dc0.png)
Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Mon Jan 28, 2008 8:03 pm Post subject: |
|
|
coolsnowmen wrote: | after killing the sshd process, you might need to zap the service to restart it |
I know how to work with init scripts, I was just concerned with why sshd wasn't stopping properly when everything appears to be proper. The main reason for concern is because the last time the sshd init script was unable to bring down sshd was because the host was compromised and a hacked sshd was running on a high port.
All of that has been cleaned up and no unknown ports are open and all processes have been accounted for.
So i sent the primary sshd a kill -s TERM but unfortunately i then ran 'stop' on the init script which did kill all connected sessions and since i -s TERM'd the daemon, I'm locked out for the time being
I will check /var/log/messages when I'm local to the machine. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jonnevers Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/182916767547279b4f55dc0.png)
Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Mon Jan 28, 2008 9:55 pm Post subject: |
|
|
after getting back locally to the machine, sshd is running again and can be restarted properly via the init script. still not sure what the issue was.
I have no /var/log/messages but /var/log/everything/current didn't show anything to note unfortunately. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bunder Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Sat Feb 16, 2008 8:02 am Post subject: |
|
|
i got the same problem... been noticing it now for a while... i used to be able to restart sshd whilst being logged in but now that doesn't work... i really don't want to log onto these machines locally because it royally messes up my utmp. _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|