[pve-devel] [PATCH] added setup_rootsshconfig to create initial ssh config for user root
Dietmar Maurer
dietmar at proxmox.com
Wed Oct 31 13:34:20 CET 2012
> +sub setup_rootsshconfig {
> +
> + # create ssh config if it does not exist
> + if (! -f $rootsshconfig) {
> + mkdir '/root/.ssh' if ( !-e '/root/.ssh' );
> + if (my $fh = IO::File->new ($rootsshconfig,
> O_CREAT|O_WRONLY|O_EXCL, 0640)) {
> + # this is the default ciphers list from debian openssl0.9.8 except
> blowfish is added as prefered
> + print $fh "Ciphers blowfish,aes128-ctr,aes192-ctr,aes256-
> ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc\n";
isn't the blowfish cipher called 'blowfish-cbc'?
> + close($fh);
> + }
> + }
> +}
> +
> sub setup_ssh_keys {
>
> # create ssh key if it does not exist diff --git a/data/PVE/pvecm
> b/data/PVE/pvecm index bb7e2c8..50593a6 100755
> --- a/data/PVE/pvecm
> +++ b/data/PVE/pvecm
> @@ -169,6 +169,7 @@ __PACKAGE__->register_method ({
>
> -f $clusterconf && die "cluster config '$clusterconf' already exists\n";
>
> + PVE::Cluster::setup_rootsshconfig();
> PVE::Cluster::setup_ssh_keys();
>
> -f $authfile || __PACKAGE__->keygen({filename => $authfile}); @@ -
> 367,6 +368,7 @@ __PACKAGE__->register_method ({
> code => sub {
> my ($param) = @_;
>
> + PVE::Cluster::setup_rootsshconfig();
> PVE::Cluster::setup_ssh_keys();
>
> my $host = $param->{hostname};
> --
> 1.7.2.5
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list