vishalmishra434 / rpms / openssh

Forked from rpms/openssh a month ago
Clone
Jan F 53f618
[Unit]
Jan F 53f618
Description=SSH RSA1 Keygeneration.
Jan F 53f618
After=syslog.target
Jan F 53f618
Before=sshd.service
Jan F 53f618
ConditionPathExists=!/etc/ssh/ssh_host_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 rsa1 -f /etc/ssh/ssh_host_key -C '' -N ''
Jan F 53f618
ExecStartPost=/bin/chown root:ssh_keys /etc/ssh/ssh_host_key
Jan F 53f618
ExecStartPost=/bin/chmod 640 /etc/ssh/ssh_host_key
Jan F 53f618
ExecStartPost=/bin/chmod 644 /etc/ssh/ssh_host_key.pub 
Jan F 53f618
ExecStartPost=/sbin/restorecon /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.pub
Jan F 53f618
RemainAfterExit=yes
Jan F 53f618
Jan F 53f618
[Install]
Jan F 53f618
WantedBy=multi-user.target