# esx setup # example on how to set up ESX. We setup ssh and also add a basic # VLAN configuration str_dir_name=`dirname $0` . $str_dir_name/xcatlib.sh logger -t xcat -p local4.info setupesx # Enable SSH access to root and exchange keys 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 restartservice ssh if [ -r /etc/ssh/sshd_config ] then logger -t xcat -p local4.info "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 -p local4.info "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 <>/etc/rc.d/rc.local <