SSH is enabled on my Pi. I'm trying to use my Pi as a remote control, where I hit a keyboard hotkey on my Pi, and my Pi sends a command to my Mac. For example: if I enter the following in terminal on my Pi, it launches an applescript on my Mac, and my Mac starts playing a New Music playlist in iTunes (I've even set up an ssh key so I don't need to enter my password):
/usr/bin/ssh Me@192.168.1.5 osascript Applescripts/iTunes/NEW_MUSIC.scpt
It works perfectly if I enter the above manually, but I can't figure out how to get it to work with the TriggerHappy daemon. /usr/bin/curl commands work like a charm for me with TriggerHappy. /usr/bin/ssh doesn't work and I can't figure out why.
Example: The following item in TriggerHappy turns on my Philips Hue lights when I type CTRL+1 on my Pi:
KEY_1+KEY_LEFTCTRL 1 /usr/bin/curl --request PUT --data "{\"scene\":\"Zq-7IOofWYEVAx6\"}" http://192.168.1.5/api/myhuelights/groups/0/action/
The above works, so why doesn't this?
KEY_1+KEY_LEFTCTRL 1 /usr/bin/ssh Me@192.168.1.5 osascript Applescripts/iTunes/NEW_MUSIC.scpt
Any idea what I'm doing wrong here?
EDIT: to be clear, I'm trying to figure out why this works on my Pi in terminal:
/usr/bin/ssh Me@192.168.1.5 osascript Applescripts/iTunes/NEW_MUSIC.scpt
...and this works on my Pi using TriggerHappy:
KEY_1+KEY_LEFTCTRL 1 /usr/bin/curl --request PUT --data "{\"scene\":\"Zq-7IOofWYEVAx6\"}" http://192.168.1.5/api/myhuelights/groups/0/action/
...but this doesn't work on my Pi using TriggerHappy:
KEY_1+KEY_LEFTCTRL 1 /usr/bin/ssh Me@192.168.1.5 osascript Applescripts/iTunes/NEW_MUSIC.scpt
I'm working with a new install of Raspbian on a new Raspberry Pi. Like I said, my curl commands work with TriggerHappy, but ssh commands don't. I feel like I'm probably overlooking something simple here. I hope?