From 762164c514e47d43fb261869a7016a8f85b80cd3 Mon Sep 17 00:00:00 2001 From: vallard Date: Thu, 21 May 2009 20:17:11 +0000 Subject: [PATCH] updated to work with generic stuff and added ssh config since remoteshell script hangs forever... pretty sure this is because of recent AIX changes... so easy to blame git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3432 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/setupesx | 42 ++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/xCAT/postscripts/setupesx b/xCAT/postscripts/setupesx index 138f77733..581b13c86 100644 --- a/xCAT/postscripts/setupesx +++ b/xCAT/postscripts/setupesx @@ -1,12 +1,41 @@ # esx setup # example on how to set up ESX. We setup ssh and also add a basic # VLAN configuration +logger -t xcat setupesx +# Enable SSH access to root and exchange keys -# Enable SSH access to root sed -e 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config > /etc/ssh/sshd_config.new mv -f /etc/ssh/sshd_config.new /etc/ssh/sshd_config /etc/init.d/sshd restart +if [ -r /etc/ssh/sshd_config ] +then + logger -t xcat "Install: setup /etc/ssh/sshd_config" + cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG + sed -i 's/^X11Forwarding .*$/X11Forwarding yes/' /etc/ssh/sshd_config + sed -i 's/^KeyRegenerationInterval .*$/KeyRegenerationInterval 0/' /etc/ssh/sshd_config + sed -i 's/\(.*MaxStartups.*\)/#\1/' /etc/ssh/sshd_config + echo "MaxStartups 1024" >>/etc/ssh/sshd_config + echo "PasswordAuthentication no" >>/etc/ssh/sshd_config +fi + +if [ -r /etc/ssh/sshd_config ] +then + echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config +fi + +if [ -d /xcatpost/_ssh ] +then + logger -t xcat "Install: setup root .ssh" + cd /xcatpost/_ssh + mkdir -p /root/.ssh + cp -f * /root/.ssh + cd - >/dev/null + chmod 700 /root/.ssh + chmod 600 /root/.ssh/* +fi + + # create a script that will launch the first time ESX does and configure # the network cat >/tmp/esxcfg.sh </tmp/esxcfg.sh <>/etc/rc.d/rc.local <