mirror of
https://github.com/KeithDHedger/LFSBootCD.git
synced 2025-07-25 17:10:31 +00:00
17 lines
520 B
Bash
Executable File
17 lines
520 B
Bash
Executable File
#! /bin/sh
|
|
|
|
if [ -z "$TOPDIR" ] ; then
|
|
echo "you must define TOPDIR"
|
|
exit
|
|
fi
|
|
|
|
[ -d $TOPDIR/hostkeys ] || mkdir $TOPDIR/hostkeys
|
|
|
|
if [ ! -f $TOPDIR/hostkeys/ssh_host_dsa_key -o ! -f $TOPDIR/hostkeys/ssh_host_dsa_key.pub ];then
|
|
ssh-keygen -t dsa -b 1024 -N "" -C "RescueCD host key" -f $TOPDIR/hostkeys/ssh_host_dsa_key
|
|
fi
|
|
|
|
if [ ! -f $TOPDIR/hostkeys/ssh_host_rsa_key -o ! -f $TOPDIR/hostkeys/ssh_host_rsa_key.pub ];then
|
|
ssh-keygen -t rsa -b 1024 -N "" -C "RescueCD host key" -f $TOPDIR/hostkeys/ssh_host_rsa_key
|
|
fi
|