The router is an RB1100Dx4 running RouterOS 7.15.3, the latest available.
I’m running a command which uses ssh to connect to a container without password (by using keys). The command runs as expected as long as it is executed manually in a terminal but it fails to run in a script with the following message sent to the log:
executing script test1 from winbox failed, please check it manually
While triyng to isolate the issue I reduced the script to only one line which also fails:
I also created another script (test2) with the following contents:
:log info message=“11111”
/system/ssh address=172.17.0.2 user=root command=“cat /test.out”
:log info message=“22222”
Whe I run this new script I see the string “11111” written to the log and inmediately after, there is the message:
executing script test1 from winbox failed, please check it manually
the line after the problematic command (22222) is never written.
It also fails from Webmin, Webfig and the scheduler.
Permissions have been changed including checking "“Don’t require permissions”
Current user is admin, I also tried with a different user with full permissions without success.
Use ssh-exec instead ssh command, ssh requires CLI (Terminal).
Regarding script errors, you can always catch script error with :onerror and log it to find exact message for debugging since standard error message “executing script ssh from winbox failed, please check it manually” is not very descriptive, for eg.: