Update nodemgmt-scripts.sh

This commit is contained in:
2019-06-08 12:01:34 -05:00
parent 9b5c2a3918
commit 840fc3f280

View File

@@ -1530,7 +1530,7 @@ VCENTER-SSL(){
eval `ssh-agent` && ssh-add ~/.ssh/$ESXiHost'_rsa'
status "Configuring $ESXiHost for ssh access"
pubkey=`cat ~/.ssh/$ESXiHost'_rsa.pub'`
ssh $ESXiUser@$ESXiHost "mkdir -p /etc/ssh/keys-$ESXiUser &&
ssh $ESXiUser@$ESXiHost "shell && mkdir -p /etc/ssh/keys-$ESXiUser &&
echo $pubkey > /etc/ssh/keys-$ESXiUser/authorized_keys &&
chmod 700 -R /etc/ssh/keys-$ESXiUser &&
chmod 600 /etc/ssh/keys-$ESXiUser/authorized_keys &&
@@ -1553,13 +1553,6 @@ VCENTER-SSL(){
status "Restarting services on $ESXiHost"
ssh $ESXiUser@$ESXiHost "services.sh restart"
# Disable UPnP http(s) port forward
status "Removing http(s) port forwarding"
upnpc -d 80 tcp
upnpc -d 443 tcp
# Prompt user to confirm/disable SSH on ESXi target
pressanykey "Remember to disable SSH service on $ESXiHost"
else
echo -e "${idsCL[Red]}Missing required variables.${idsCL[Default]}"
exit 1