I have a scenario where I have to copy a sh script and multiple ESXi hosts, Change the permission and run it.
The file copy is working fine.
For changing the permissions
chmod +x wasn't accepted but the workaround was to use
To run the script I run it in a new session using
setsid (as described in VMware KB). Unluckily WinSCP returns "Unknown command ''setsid'." error message while running the same in PuTTY works fine.
Full code used is the following:
Or what I am doing wrong?
Thanks a lot in advance for your help,