Hi I have created a script on the a vMA to ssh in to Esxi and perform the /sbin/shutdown.sh && /sbin/poweroff.
I have set up password free access to the Esxi with keys.
The scrip is
ssh root@xxx.xxx.xxx.xxx
/sbin/shutdown.sh && /sbin/poweroff
I have added to the vMA sudoers vi-admin:ALL
I run the script with
sudo /home/vi-admin/ups.sh
It stops after each line after loging in to the ESXi....Im missing something here ???
Tony
Hi,
"ssh root@IP"
will open the session and close it right after.
you can use "ssh root@IP COMMAND" in a single line to open the ssh, run the command and close the connection right after.
Another problem might be, that some commands might not be allowed to be executed from remote because they require a tty. In this case ssh knows the option -t to force a pseudo-ttyp allocation.
Regards
Tim
Hi,
"ssh root@IP"
will open the session and close it right after.
you can use "ssh root@IP COMMAND" in a single line to open the ssh, run the command and close the connection right after.
Another problem might be, that some commands might not be allowed to be executed from remote because they require a tty. In this case ssh knows the option -t to force a pseudo-ttyp allocation.
Regards
Tim