Update nodemgmt-scripts.sh
This commit is contained in:
@@ -1530,7 +1530,7 @@ VCENTER-SSL(){
|
|||||||
eval `ssh-agent` && ssh-add ~/.ssh/$ESXiHost'_rsa'
|
eval `ssh-agent` && ssh-add ~/.ssh/$ESXiHost'_rsa'
|
||||||
status "Configuring $ESXiHost for ssh access"
|
status "Configuring $ESXiHost for ssh access"
|
||||||
pubkey=`cat ~/.ssh/$ESXiHost'_rsa.pub'`
|
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 &&
|
echo $pubkey > /etc/ssh/keys-$ESXiUser/authorized_keys &&
|
||||||
chmod 700 -R /etc/ssh/keys-$ESXiUser &&
|
chmod 700 -R /etc/ssh/keys-$ESXiUser &&
|
||||||
chmod 600 /etc/ssh/keys-$ESXiUser/authorized_keys &&
|
chmod 600 /etc/ssh/keys-$ESXiUser/authorized_keys &&
|
||||||
@@ -1553,13 +1553,6 @@ VCENTER-SSL(){
|
|||||||
status "Restarting services on $ESXiHost"
|
status "Restarting services on $ESXiHost"
|
||||||
ssh $ESXiUser@$ESXiHost "services.sh restart"
|
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
|
else
|
||||||
echo -e "${idsCL[Red]}Missing required variables.${idsCL[Default]}"
|
echo -e "${idsCL[Red]}Missing required variables.${idsCL[Default]}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user