mirror of
git://git.2f30.org/morpheus.git
synced 2024-06-28 14:21:21 +00:00
20 lines
402 B
Plaintext
Executable File
20 lines
402 B
Plaintext
Executable File
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
|