From 81d2ea1a558c9aa6c9e6999466584df2f26cb148 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 20 Aug 2010 14:48:31 +0000 Subject: [PATCH] -Have esxi hosts trust the root ssh key by default git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7175 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 8a232cc84..447a6b762 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -2919,6 +2919,12 @@ sub makecustomizedmod { if (-e "$::XCATROOT/share/xcat/netboot/esxi/xcatsplash") { copy( "$::XCATROOT/share/xcat/netboot/esxi/xcatsplash",$tempdir."/etc/vmware/welcome"); } + if (-r "/root/.ssh/id_rsa.pub") { + my $umask = umask(0077);#don't remember if dropbear is picky, but just in case + mkpath($tempdir."/.ssh"; + copy("/root/.ssh/id_rsa.pub",$tempdir."/.ssh/authorized_keys"); + umask($umask; + } my $tfile; mkpath($tempdir."/var/run/vmware"); open $tfile,">",$tempdir."/var/run/vmware/show-tech-support-login";