1345898cd7011b371c0fa45e3b255a3bd819fdd9
[grml-live.git] / etc / grml / fai / config / files / etc / systemd / system / ssh.service / GRMLBASE
1 # This file was deployed via grml-live's
2 # ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/15-initsetup, using
3 # ${GRML_FAI_CONFIG}/config/files/etc/systemd/system/ssh.service/GRMLBASE
4
5 [Unit]
6 Description=OpenBSD Secure Shell server
7 After=network.target auditd.service
8 ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
9
10 [Service]
11 EnvironmentFile=-/etc/default/ssh
12 ExecStartPre=-/bin/sh -c "[ ! -f /etc/ssh/ssh_host_rsa_key ]      && /usr/bin/ssh-keygen -t rsa     -f /etc/ssh/ssh_host_rsa_key     -C '' -N ''"
13 ExecStartPre=-/bin/sh -c "[ ! -f /etc/ssh/ssh_host_dsa_key ]      && /usr/bin/ssh-keygen -t dsa     -f /etc/ssh/ssh_host_dsa_key     -C '' -N ''"
14 ExecStartPre=-/bin/sh -c "[ ! -f /etc/ssh/ssh_host_ecdsa_key ]    && /usr/bin/ssh-keygen -t ecdsa   -f /etc/ssh/ssh_host_ecdsa_key   -C '' -N ''"
15 ExecStartPre=-/bin/sh -c "[ ! -f /etc/ssh/ssh_host_ed25519_key ]  && /usr/bin/ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -C '' -N ''"
16 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
17 ExecReload=/bin/kill -HUP $MAINPID
18 KillMode=process
19 Restart=on-failure
20
21 [Install]
22 WantedBy=multi-user.target
23 Alias=sshd.service
24