[Bug 624361] [NEW] service ssh restart does not test the configuration file

Simon Déziel 624361 at bugs.launchpad.net
Thu Aug 26 02:05:09 BST 2010


Public bug reported:

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/sshd_config" and mistakenly inserted an error. I
tried to apply my modification by restarting 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/sshd_config.

After some digging I found the error :

# service ssh try-restart
/etc/ssh/sshd_config line 100: Directive 'AllowUsers' is not allowed within a Match block

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://ca.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        100 /var/lib/dpkg/status
     1:5.3p1-3ubuntu3 0
        500 http://ca.archive.ubuntu.com/ubuntu/ lucid/main Packages

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: openssh-server 1:5.3p1-3ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-24.41-generic 2.6.32.15+drm33.5
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

** Affects: openssh (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug lucid

-- 
service ssh restart does not test the configuration file
https://bugs.launchpad.net/bugs/624361
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openssh in ubuntu.



More information about the Ubuntu-server-bugs mailing list