Red Hat Bugzilla – Bug 1279521
sshd.service requires /etc/sysconfig/sshd to be present to start
Last modified: 2015-12-22 17:00:13 EST
Description of problem:
sshd.service contains EnvironmentFile=/etc/sysconfig/sshd, which means that service cannot start unless /etc/sysconfig/sshd is present. sshd should work fine without that file, since it appears to only contain the defaults. Requiring the file makes it harder to boot with empty /etc.
should be enough.
Version-Release number of selected component (if applicable):
This seems reasonable. But ...
... you will move only a bit further to booting with empty /etc since sshd will fail to start without having at least sshd_config in /etc/ssh. You can expect that sshd-keygen will create the host keys, but without config it is no-go to start sshd.
Yes... I know it is not a complete solution. But it's a step at least... Proper solution would be to not require sshd_config at all, and have the right defaults compiled in.
This step is ok. Anyway openssh have defaults compiled in, but not all of them are currently the same as distro defaults.
Openssh is not able to start without reading the config. Reading failures are fatal.
Basically it works just fine with empty file or /dev/null:
/usr/sbin/sshd -Ddddf /dev/null
I applied the proposed patch and it will be in the next update.
openssh-7.1p1-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8e6294b5c2
openssh-7.1p1-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update openssh'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8e6294b5c2
openssh-7.1p1-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.