Cannot run command in script

Hi,

I’ve got the following script:

:put "SSH settings"
/ip/ssh/set strong-crypto=yes
/file/add name="authorized.pub" contents="ssh-ed25519 A... user@example"
/user/ssh-keys/import user=admin public-key-file=authorized.pub

The commands work fine in interactive terminal, but inside the script an error appears:

Script Error: syntax error (line 4 column 50)

What’s wrong here?

OK, the problem are the missing quotes for the file name in the last line. But why does it work in interactive terminal then?