Automation using "Run script over SSH" works in testing, but not when triggered by HomeKit

Cupertino, May 15, 2021

** What I'm trying to do: ** - when a door opens, use the "Run script over SSH" action to trigger an AppleScript to send me an iMessage * I've worked before *, but at some point in the last month, it stopped working. I've done a lot of different HomeKit automations, so I can't tell if something I did triggered the problem. [It shouldn't make any difference, but I have other Automations triggered by the same door opening (playing a sound on the HomePod). I keep them in separate Automations because ultimately I want the iMessage one to be executed only when I'm not home]

& # x200B; ** Details about my process ** 1) The door sensor opens, performs a "Run script over SSH" action 2) The "Run script over SSH" action calls an AppleScript on a Mac Mini. I use password authentication 3) AppleScript sends me an iMessageâ & # x20AC; & # x2122; ** What works: ** 1) When I am in the "Run script over SSH" action itself and touch the orange triangle, I get the "Unknown host" dialog. The key fingerprint of the host is displayed. On the host computer, in the Console, I see three "failed sending: invalid argument" errors in the sshd process, followed by three kernel process errors, all related to sshd. If I tap the Continue button, AppleScript runs correctly and receives the correct iMessage delivery. The console on the target iMac adds a bunch of errors (to be fair, sending an iMessage directly from the Messages app on Mac OS to the host computer seems to generate similar errors) 2) When I'm inside the automation and touch the "Test automation" button, I see the same results as above, without the Unknown Host dialog and the need to touch Continue. The same error messages in the host console, the same successful iMessage sent & # x200B;

[Host iMac's Console (success)](https://preview.redd.it/l2h4tzlvf6z61.png?width=1054&format=png&auto=webp&s=1375fcaf58b7dd0d9506296eabc908d877c7469b) ** What does not work: ** 1) Triggering uș. The host console has the same three sshd errors and the same three kernel errors, but nothing happens beyond that (no other console errors, no iMessage) & # x200B;

[Host iMac's Console (fail)](https://preview.redd.it/9gc9kkr5h6z61.png?width=1082&format=png&auto=webp&s=cc15fadb5e94ad24176944d16676d62c3929c4db) & # x200B; Am I doing something wrong? Would using SSH key authentication help? (and if “yes”, an indicator to how to implement this!) Any help or guidance or request for more information is appreciated.

Best selling & Top trending HomeKit product in our shop at this moment

HomeKit.Blog is in no way affiliated with or endorsed by Apple Inc. or Apple related subsidiaries.

All images, videos and logos are the copyright of the respective rights holders, and this website does not claim ownership or copyright of the aforementioned.

All information about products mentioned on this site has been collected in good faith. However, the information relating to them, may not be 100% accurate, as we only rely on the information we are able to gather from the companies themselves or the resellers who stock these products, and therefore cannot be held responsible for any inaccuracies arising from the aforementioned sources, or any subsequent changes that are made that we have not been made aware of.

HomeKit.Blog Is A Participant In The Amazon Services LLC Associates Program, An Affiliate Advertising Program Designed To Provide A Means For Sites To Earn Advertising Fees By Advertising And Linking To Amazon Store (Amazon.com, Or Endless.com, MYHABIT.com, SmallParts.com, Or AmazonWireless.com).

The opinions expressed on this website by our contributors do not necessarily represent the views of the website owners. 

Copyright © 2022 HomeKit Blog
. All rights reserved
United States