why ssh not working in script?

I have setup SSH key between two MT but following command not working in script it does work on terminal. Why?

RouterOS version: 6.34.2

/system ssh 10.0.0.2 user=sync-config command="/ip service enable 1"

what is the work around ?