It would really be nice to have the ability to connect to other devices and run commands via SSH from a script.
Check the /system ssh command.
Have you tried connecting to a remote device and executing commands from a script? I can do it manually but not from a script as it appears its not currently supported.