It seems similar to this:
http://forum.mikrotik.com/t/dhcp-lease-script-cannot-use-ssh-exec-with-public-private-key-for-automated-login/142047/1
Workaround at the end, while not exactly pretty, may be good enough for you too.