wok-current rev 19829
dropbear: add ecdsa key
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Mar 09 18:47:59 2017 +0100 (2017-03-09) |
parents | fd4b65b5c1de |
children | 035492d51952 |
files | dropbear/receipt dropbear/stuff/init.d/dropbear openssh-pam/receipt openssh/receipt |
line diff
1.1 --- a/dropbear/receipt Thu Mar 09 09:54:22 2017 +0100 1.2 +++ b/dropbear/receipt Thu Mar 09 18:47:59 2017 +0100 1.3 @@ -83,6 +83,7 @@ 1.4 ln -s sshx $fs/usr/bin/sshfbvnc 1.5 touch $fs/etc/dropbear/dropbear_dss_host_key \ 1.6 $fs/etc/dropbear/dropbear_rsa_host_key \ 1.7 + $fs/etc/dropbear/dropbear_ecdsa_host_key 1.8 1.9 # Fix dropbear initscript perms 1.10 chown -R root.root $fs 1.11 @@ -98,6 +99,7 @@ 1.12 done <<EOT 1.13 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key 1.14 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key 1.15 +/etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key 1.16 EOT 1.17 grep -q ssh "$1/etc/inetd.conf" || cat >> "$1/etc/inetd.conf" <<EOT 1.18 #ssh stream tcp nowait root dropbear dropbear -i -b /etc/dropbear/banner
2.1 --- a/dropbear/stuff/init.d/dropbear Thu Mar 09 09:54:22 2017 +0100 2.2 +++ b/dropbear/stuff/init.d/dropbear Thu Mar 09 18:47:59 2017 +0100 2.3 @@ -31,6 +31,13 @@ 2.4 dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key >/dev/null 2>&1 2.5 status 2.6 fi 2.7 + if [ ! -s /etc/dropbear/dropbear_ecdsa_host_key ] ; then 2.8 + action 'Generating Dropbear %s key...' ECDSA 2.9 + # Need to delete key before creating it. 2.10 + rm -f /etc/dropbear/dropbear_ecdsa_host_key 2.11 + dropbearkey -t ecdsa -f /etc/dropbear/dropbear_ecdsa_host_key >/dev/null 2>&1 2.12 + status 2.13 + fi 2.14 if active_pidfile $PIDFILE dropbear ; then 2.15 _ '%s is already running.' $NAME 2.16 exit 1
3.1 --- a/openssh-pam/receipt Thu Mar 09 09:54:22 2017 +0100 3.2 +++ b/openssh-pam/receipt Thu Mar 09 18:47:59 2017 +0100 3.3 @@ -75,6 +75,7 @@ 3.4 done <<EOT 3.5 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key 3.6 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key 3.7 +/etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key 3.8 EOT 3.9 3.10 chroot "$1/" ssh-keygen -A
4.1 --- a/openssh/receipt Thu Mar 09 09:54:22 2017 +0100 4.2 +++ b/openssh/receipt Thu Mar 09 18:47:59 2017 +0100 4.3 @@ -76,6 +76,7 @@ 4.4 done <<EOT 4.5 /etc/dropbear/dropbear_rsa_host_key /etc/ssh/ssh_host_rsa_key 4.6 /etc/dropbear/dropbear_dss_host_key /etc/ssh/ssh_host_dsa_key 4.7 +/etc/dropbear/dropbear_ecdsa_host_key /etc/ssh/ssh_host_ecdsa_key 4.8 EOT 4.9 4.10 chroot "$1/" ssh-keygen -A