7
edits
Changes
→Fix SSH host keys in Squeeze
{{Note|This will not work using the dependency-based boot sequence introduced with Squeeze...
-- what is required to get this fixed? }}
=== Fix SSH host keys in Squeeze using dependency-based booting ===
<!-- please do not remove <source>...</source> pair of tags below,
otherwise quotes after -N (-N '') are not visible -->
<source lang="bash">
rm -f /etc/ssh/ssh_host_*
cat << EOF > /etc/init.d/ssh_gen_host_keys
#!/bin/sh
### BEGIN INIT INFO
# Provides: Generates new ssh host keys at first boot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Generates new ssh host keys at first boot
# Description: Generates new ssh host keys at first boot
### END INIT INFO
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ''
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''
insserv -r ssh_gen_host_keys
rm -f \$0
EOF
chmod a+x /etc/init.d/ssh_gen_host_keys
insserv /etc/init.d/ssh_gen_host_keys
</source>
=== Change timezone ===