distribution/packages/network/openssh/system.d/sshd.service
2022-02-05 09:23:32 -05:00

20 lines
606 B
Desktop File

[Unit]
Description=OpenSSH server daemon
ConditionKernelCommandLine=|ssh
ConditionPathExists=|/storage/.cache/services/sshd.conf
[Service]
Restart=on-failure
EnvironmentFile=-/storage/.cache/services/sshd.conf
ExecStartPre=-/bin/sh -c 'mkdir -p /storage/.cache/ssh'
ExecStartPre=/usr/bin/ssh-keygen -A
ExecStartPre=-/bin/sh -c 'chmod 600 /storage/.cache/ssh/ssh_host_*'
ExecStartPre=-/bin/sh -c 'chmod 644 /storage/.cache/ssh/ssh_host_*.pub'
ExecStart=/usr/sbin/sshd -D $SSH_ARGS
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=1s
RestartSec=2
StartLimitInterval=0
[Install]
WantedBy=multi-user.target