Bug#923508: systemd not restarting sshd on Debian 9 Stretch i386 due to RestartPreventExitStatus=255 in sshd.service file

Michael Biebl biebl at debian.org
Sat Mar 2 13:09:02 GMT 2019


Am 02.03.19 um 09:28 schrieb Michael Biebl:
> http://bugs.debian.org/778913 contains more information why it
> was added to ssh.service. Short version: sshd will return with an exit
> code of 255 when your config file contains errors. Repeatedly restarting
> sshd in that case is not a sensible thing to do as you will hit a
> restart limit and ssh.service will be marked as failed.
> 
> In any case, you need to discuss changes to ssh.service with the
> openssh-server maintainer.

Hm, it seems RestartPreventExitStatus=255 is not working the way I would
have expected it to be according to the documentation.

Since in case of a config error, it is
ExecStartPre=/usr/sbin/sshd -t
which fails with 255, systemd will actually restart ssh.service until it
hits a restart limit.

The only difference is, that "systemctl status ssh.service" will not
mark the service as failed.



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20190302/b0d50b63/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list