#!/bin/sh

### BEGIN INIT INFO
# Provides:          Generates new ssh host keys on first boot
# Required-Start:     
# Required-Stop:      
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Generates new ssh host keys on first boot
# Description:       Generates new ssh host keys on first boot
### END INIT INFO

# use directly, w/o dpkg-reconfigure openssh-server
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ''
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''

# remove from system and insserv
insserv -r /etc/init.d/ssh_gen_host_keys
rm -f $0

# EOF
