Add dropbearkeys

This commit is contained in:
sin 2013-09-23 17:06:26 +01:00
parent 4f1f4122eb
commit 9f76225185
2 changed files with 20 additions and 0 deletions

View File

@ -30,4 +30,5 @@ install() {
ln -s dbclient ssh
popd
popd
cp $top/stuff/dropbearkeys $root/etc
}

19
stuff/dropbearkeys Executable file
View File

@ -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