You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2009/08/21 17:02:00 UTC

svn commit: r806583 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Author: fapeeler
Date: Fri Aug 21 15:02:00 2009
New Revision: 806583

URL: http://svn.apache.org/viewvc?rev=806583&view=rev
Log:
VCL-204

post-load option to clear known identity keys for Linux.pm 

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm?rev=806583&r1=806582&r2=806583&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Linux.pm Fri Aug 21 15:02:00 2009
@@ -220,6 +220,17 @@
 	else {
 		notify($ERRORS{'CRITICAL'}, 0, "failed to clear AllowUsers from external_sshd_config");
 	}
+
+	#Clear ssh idenity keys from /root/.ssh 
+	my $clear_private_keys = "/bin/rm -f /root/.ssh/id_rsa /root/.ssh/id_rsa.pub";
+	if (run_ssh_command($computer_node_name, $management_node_keys, $clear_private_keys, "root")) {
+		notify($ERRORS{'DEBUG'}, 0, "cleared any id_rsa keys from /root/.ssh");
+		return 1;
+	}
+	else {
+		notify($ERRORS{'CRITICAL'}, 0, "failed to clear any id_rsa keys from /root/.ssh");
+	}
+
 	return 1;
 
 } ## end sub post_load