]> TLD Linux GIT Repositories - packages/openssh.git/commitdiff
- generate ed25519 key too
authorMarcin Krol <hawk@tld-linux.org>
Thu, 6 Feb 2014 09:21:59 +0000 (09:21 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Thu, 6 Feb 2014 09:21:59 +0000 (09:21 +0000)
opensshd.init

index ab59061b6e528a458878d3b90b8e1d42cd5d7d17..a00a9dad600e334dfac703197d0b47a306732402 100755 (executable)
@@ -67,6 +67,11 @@ ssh_gen_keys() {
                chmod 600 /etc/ssh/ssh_host_ecdsa_key
                [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_ecdsa_key
        fi # ecdsa
+       if [ ! -f /etc/ssh/ssh_host_ed25519_key -o ! -s /etc/ssh/ssh_host_ed25519_key ]; then
+               /usr/bin/ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N '' >&2
+               chmod 600 /etc/ssh/ssh_host_ed25519_key
+               [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_ed25519_key
+       fi # ed25519
 }
 
 start() {