Exec Binding in OH3

Ah you are right. I executed the command as openhabian.

So I have to allow rsa access for openhab and enter the command in sudoers.d, right? Or is there an easier way?

You could do other ways of triggering something on the remote host like trigger via MQTT or storing a file on a shared folder. The remote host would have to do polling then.

But I think sudo is not required.
You can create a private/public key pair in .ssh under the home of openhab ( /var/lib/openhab/.ssh ).
Then make sure that during runtime that key is selected in case it is not found per default.
sudo might be required because the user does not have a shell.