Check out How to solve Exec binding problems
In all likelihood you do not realize or forgot that openHAB runs as the openhab user, not pi, root, openhabian, nor any other account you need to log in as. Any permissions (e.g. sudo), ssh certs, group memberships, or any other configuration on the account needs to be done to the openhab account.