infrastructure/roles/luks_ssh/files/sshd.service
saibotk 20e150f453
feat(luks_ssh): Update with latest upstream changes
This includes a MOTD and some small adjustments for Fedora etc.

See a35fbc1ec4
2024-03-10 01:08:00 +01:00

36 lines
1.1 KiB
Desktop File

[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
DefaultDependencies=no
Before=cryptsetup.target
[Service]
# With `Type=notify` the sshd service is started in a reliable
# and robust way but it requires an sshd with systemd support.
# Fedora/RHEL/CentOS/Debian/Ubuntu provide such an sshd.
#
# On distributions such as Gentoo, sshd doesn't come with
# systemd support, thus, one has to set `Type=simple` there.
Type=notify
EnvironmentFile=-/etc/crypto-policies/back-ends/opensshserver.config
EnvironmentFile=-/etc/crypto-policies/back-ends/openssh-server.config
EnvironmentFile=-/etc/sysconfig/sshd
EnvironmentFile=-/etc/sysconfig/ssh
EnvironmentFile=-/etc/sysconfig/dracut-sshd
# Start command requires the `-e` option if and only if `Type=simple`
# is configured, see above.
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS $OPTIONS $CRYPTO_POLICY
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s
# Create privilege separation directory /run/sshd for Debian/Ubuntu
RuntimeDirectory=sshd
RuntimeDirectoryMode=0755
[Install]
WantedBy=sysinit.target