commit 9f76225185a6783b8726d02d32f4af27281cb329 parent 4f1f4122eb1093648f7f78bfa0a5e6a46a2687a6 Author: sin <sin@2f30.org> Date: Mon, 23 Sep 2013 17:06:26 +0100 Add dropbearkeys Diffstat:
M | pkgs/dropbear | | | 1 | + |
A | stuff/dropbearkeys | | | 19 | +++++++++++++++++++ |
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/pkgs/dropbear b/pkgs/dropbear @@ -30,4 +30,5 @@ install() { ln -s dbclient ssh popd popd + cp $top/stuff/dropbearkeys $root/etc } diff --git a/stuff/dropbearkeys b/stuff/dropbearkeys @@ -0,0 +1,19 @@ +makekey() { + key=$1 + if [ "$key" = "rsa" ] ; then + bits=2048 + else + bits=1024 + fi + filename=dropbear_${key}_host_key + rm -f ${filename}.pub + rm -f ${filename} + dropbearkey -s $bits -t $key -f ${filename} | tail -n2 > ${filename}.pub +} + +dbdir=/etc/dropbear +mkdir -p $dbdir +cd $dbdir +makekey rsa +makekey dss +cd - &>/dev/null