File: //etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/sbin/modprobe tcp_htcp
/bin/echo '131072' > /sys/module/nf_conntrack/parameters/hashsize
SSHKEYGEN=/usr/bin/ssh-keygen
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
$SSHKEYGEN -q -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" \
-C "" < /dev/null > /dev/null 2> /dev/null
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
$SSHKEYGEN -q -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" \
-C "" < /dev/null > /dev/null 2> /dev/null
fi
if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then
$SSHKEYGEN -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N "" \
-C "" < /dev/null > /dev/null 2> /dev/null
fi
if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then
$SSHKEYGEN -q -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" \
-C "" < /dev/null > /dev/null 2> /dev/null
fi
exit 0