vishalmishra434 / rpms / openssh

Forked from rpms/openssh 3 months ago
Clone
Jan F 53f618
[Unit]
Jan F 53f618
Description=SSH DSA Keygeneration.
Jan F 53f618
After=syslog.target
Jan F 53f618
Before=sshd.service
Jan F 53f618
ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
Jan F 53f618
Jan F 53f618
[Service]
Jan F 53f618
Type=oneshot
Jan F 53f618
EnvironmentFile=/etc/sysconfig/sshd
Jan F 53f618
ExecStart=/usr/bin/ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N ''
Jan F 53f618
ExecStartPost=/bin/chown root:ssh_keys /etc/ssh/ssh_host_dsa_key
Jan F 53f618
ExecStartPost=/bin/chmod 640 /etc/ssh/ssh_host_dsa_key
Jan F 53f618
ExecStartPost=/bin/chmod 644 /etc/ssh/ssh_host_dsa_key.pub
Jan F 53f618
ExecStartPost=/sbin/restorecon /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_dsa_key.pub
Jan F 53f618
RemainAfterExit=yes
Jan F 53f618
Jan F 53f618
[Install]
Jan F 53f618
WantedBy=multi-user.target