[pve-devel] [PATCH RFC 02/21] add variable for default ssh key size $ssh_key_size

Dietmar Maurer dietmar at proxmox.com
Mon Nov 28 08:08:54 CET 2016


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 data/PVE/Cluster.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm
index 2210bfe..00b4a0c 100644
--- a/data/PVE/Cluster.pm
+++ b/data/PVE/Cluster.pm
@@ -49,6 +49,7 @@ my $pveca_cert_fn = "$basedir/pve-root-ca.pem";
 my $pvewww_key_fn = "$basedir/pve-www.key";
 
 # ssh related files
+my $ssh_key_size = 2048;
 my $ssh_cluster_ca_priv = "$authdir/pve-ssh-ca";
 my $ssh_cluster_ca_cert = "$basedir/pve-ssh-ca.pub";
 my $ssh_rsa_id_priv = "/root/.ssh/id_rsa";
@@ -1149,7 +1150,7 @@ sub setup_rootsshconfig {
     # create ssh key if it does not exist
     if (! -f $ssh_rsa_id) {
 	mkdir '/root/.ssh/';
-	system ("echo|ssh-keygen -t rsa -N '' -b 2048 -f ${ssh_rsa_id_priv}");
+	system ("echo|ssh-keygen -t rsa -N '' -b $ssh_key_size -f ${ssh_rsa_id_priv}");
     }
 
     # create ssh config if it does not exist
-- 
2.1.4




More information about the pve-devel mailing list