Exec Binding - My thing doesn't do anything

I have a simple command which I would like to run at various times. I have attempted to set the command up with the Exec binding to turn it into a switch.

The things ‘Running’ channel is linked to a switch item, this switch item is greyed out in the PaperUI Control tab and when I try to send an ON command through other means, it immediately returns to OFF and no action takes place. The only entry in the events log relating to the thing and item is:

2020-01-28 20:31:24.877 [ome.event.ItemCommandEvent] - Item 'switch_ff_bed_deskscreenoff' received command ON
2020-01-28 20:31:24.882 [nt.ItemStatePredictedEvent] - switch_ff_bed_deskscreenoff predicted to become ON
2020-01-28 20:31:24.899 [vent.ItemStateChangedEvent] - switch_ff_bed_deskscreenoff changed from OFF to ON
2020-01-28 20:31:25.009 [vent.ItemStateChangedEvent] - switch_ff_bed_deskscreenoff changed from ON to OFF

The command, which has been set up in PaperUI is:
ssh pi@desk-screen.dev.fjla.uk xset -display :0 dpms force off

I have confirmed that the command can be run by the openhab user with no further input, the SSH keys allow login without password.

I did previously have a similar Exec thing setup but I’ve now moved onto a new system and noticed it’s stopped working and is showing the same symptoms.

Version: openHAB 2.4.0 Release Build
OS: Ubuntu 18.04
CPU: QEMU Virtual CPU

Thanks in advanced for any help you can give.

If it’s strictly time based, why not use a Linux cron job instead?

Actually it looks like it runs for close to a second before switching back to OFF.

What’s in the out Channel? That’s the output from the command. Maybe there is an error in there?

If it’s strictly time based, why not use a Linux cron job instead?

It is timebound for now but when I get it working correctly, I’ll be integrating it with rules and other Exec commands I have yet to implement.

What’s in the out Channel?

The output was: Host key verification failed, this was rather odd as it ran fine from the command line. However after regenerating keys, the error is gone.

Thanks for your help.