]>
git.proxmox.com Git - dab.git/blob - scripts/ssh_gen_host_keys
ed32fe7b48f771177f501c1bf323f23a0bdc5549
3 # Provides: ssh_gen_host_keys
4 # Required-Start: $local_fs
9 # Short-Description: Regenerate SSH keys
10 # Description: Regenerate container SSH keys for uniqueness.
15 HNAME
=`head -n 1 /etc/hostname|awk '{ print $1; }'`
17 if [ "X${HNAME}" = "Xlocalhost" ] ; then
21 echo "generating ssh host keys"
23 rm -f /etc
/ssh
/ssh_host_rsa_key
24 ssh-keygen
-q -f /etc
/ssh
/ssh_host_rsa_key
-t rsa
-N ''
26 rm -f /etc
/ssh
/ssh_host_dsa_key
27 ssh-keygen
-q -f /etc
/ssh
/ssh_host_dsa_key
-t dsa
-N ''
29 if [ -x /sbin
/insserv
] ; then
30 /sbin
/insserv
-r ssh_gen_host_keys
31 rm -f /etc
/init.d
/ssh_gen_host_keys
33 rm -f /etc
/init.d
/ssh_gen_host_keys
34 update-rc.d
-f ssh_gen_host_keys remove