/etc/init.d/ssh gives OK status even if daemon fails to launch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
openssh (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: lsb
lsb-base: /lib/lsb/
I can run the script, but no sshd is launched:
$ sudo /etc/init.d/ssh start
* Starting OpenBSD Secure Shell server sshd [ OK ]
$ pgrep -l sshd || echo Not There
Not There
If I launch sshd manually, it gives me a proper error message:
sudo /usr/sbin/sshd -Dd
debug1: sshd version OpenSSH_5.1p1 Debian-6ubuntu1
[snip]
debug1: Bind to port 22 on 192.168.0.5.
Bind to port 22 on 192.168.0.5 failed: Cannot assign requested address.
I expect that in such a situation /etc/init.d/ssh should show an error, something like this:
$ sudo /etc/init.d/ssh start
* Starting OpenBSD Secure Shell server sshd [ FAIL]
Starting sshd failed : Bind to port 22 on 192.168.0.5 failed: Cannot assign requested address.
$ apt-cache policy lsb-base
lsb-base:
Installed: 4.0-0ubuntu5
Candidate: 4.0-0ubuntu5
Version table:
*** 4.0-0ubuntu5 0
500 http://
100 /var/lib/
$ lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
If someone misconfigures the server and then uses /etc/init.d/ssh to restart the server. They will get locked out (aka denial of service) if they did not plan carefully enough to test which processes are running, that's not something your average sysadmin should be expected to do. The script should work...
ProblemType: Bug
Architecture: i386
Date: Thu Oct 22 22:21:28 2009
DistroRelease: Ubuntu 9.10
Package: lsb-base 4.0-0ubuntu5
PackageArchitec
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, no user)
LANG=en_US.UTF-8
LANGUAGE=
ProcVersionSign
SourcePackage: lsb
Uname: Linux 2.6.31-14-generic i686
XsessionErrors: (polkit-
Changed in openssh (Ubuntu): | |
importance: | Undecided → Medium |
Did you check for the existence of the /run/sshd directory? Is UsePrivilegeSep aration set to yes?