service ssh restart does not test the configuration file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Debian) |
Fix Released
|
Unknown
|
|||
openssh (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Triaged
|
Low
|
Unassigned |
Bug Description
I would have expect "service ssh restart" to run the configuration test as "/etc/init.d/ssh restart" do. Or at least, I would have expect to have a meaningful exit status in case of failure.
I modified "/etc/ssh/
# service ssh restart
ssh start/running
# echo $?
0
Because no error were reported I assumed that SSH was running with the new configuration. I was wrong because SSH never restarted because of a the syntax error in /etc/ssh/
After some digging I found the error :
# service ssh try-restart
/etc/ssh/
Am I wrong to expecting that the new starting method provided in Lucid ("service <name> <action>") is equivalent to the old technique involving an init script ?
# lsb_release -rd
Description: Ubuntu 10.04.1 LTS
Release: 10.04
# apt-cache policy openssh-server
openssh-server:
Installed: 1:5.3p1-3ubuntu4
Candidate: 1:5.3p1-3ubuntu4
Version table:
*** 1:5.3p1-3ubuntu4 0
500 http://
100 /var/lib/
1:
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: openssh-server 1:5.3p1-3ubuntu4
ProcVersionSign
Uname: Linux 2.6.32-24-generic x86_64
Architecture: amd64
Date: Wed Aug 25 20:56:54 2010
ProcEnviron:
LANG=en_US.UTF8
SHELL=/bin/bash
SourcePackage: openssh
tags: | added: regression-release |
Changed in openssh (Debian): | |
status: | Unknown → Fix Released |
I just found this in OpenSSH changelog for Maverick :
openssh (1:5.5p1-3ubuntu1) maverick; urgency=low
...
- Convert to Upstart. The init script is still here for the benefit of
people running sshd in chroots.
...
Is it planned to drop the init script eventually ?