Switch on/off QNAP NAS via LAN

i tried to switch by QNAP NAS on and off via openhab therfore I included one switch

Switch PC "NASr" { wol="", exec=">[OFF:ssh -p PORT USER@IP halt]" }

Switching on is fine but off not…
I created one key under root user

ssh-keygen -t rsa -b 4096
and copied this to my NAS
ssh-copy-id -p PORT -i ~/.ssh/id_rsa.pub USER@IP

offline via the console everything is fine but not with the switch…any help???

openHAB is per default executed as user openhab, not root.
Furthermore, I’m pretty sure you will have to provide the path to ssh.

How can I Solve this easily for the user openhab???

login as user openhab by using

sudo su -s /bin/bash openhab

and create another ssh key pair. :slight_smile: