[pve-devel] dab ssh_gen_host_keys wheezy compatibility

Eric Blevins eric at netwalk.com
Thu Oct 4 20:14:26 CEST 2012


Wheezy by default generates ecdsa keys too, so ssh_gen_host_keys needs
to recreate them on first startup.
The following patch will correct this problem:

diff -rupN ssh_old/ssh_gen_host_keys ssh_new/ssh_gen_host_keys
--- ssh_old/ssh_gen_host_keys   2012-10-04 13:50:31.000000000 -0400
+++ ssh_new/ssh_gen_host_keys   2012-10-04 13:55:43.000000000 -0400
@@ -26,6 +26,11 @@ ssh-keygen -q -f /etc/ssh/ssh_host_rsa_k
 rm -f /etc/ssh/ssh_host_dsa_key
 ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''
 
+if [ -f /etc/ssh/ssh_host_ecdsa_key ] ; then
+    rm -f /etc/ssh/ssh_host_ecdsa_key
+    ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
+fi
+
 if [ -x /sbin/insserv ] ; then
     /sbin/insserv -r ssh_gen_host_keys
     rm -f /etc/init.d/ssh_gen_host_keys




More information about the pve-devel mailing list