Artificial intelligent assistant

Broadcast or send machine readable code to ssh clients Here's an interesting situation. I have: * A Linux box that is a motion sensor and can execute command line commands upon receiving a motion event (see the Linux motion app). * Another Linux box that (I would like to) dedicated to additional processing in the event that a motion is detected. The reason I don't want the first Linux box to do additional processing is that it is woefully underpowered and isn't conveniently connected to other systems that I'd like to activate. So my question is, how do I broadcast or send **machine readable code** from that first Linux box to another Linux box (or any ssh client) to trigger further processing based on the type of code? I tried the broadcast command but for some reason, it shows up as empty in the clients instead of a specific code. In addition, how do I enable the 2nd Linux box to act upon the code? Should it be a cronjob or some sort of listener?

### Step #1

First make sure the motion sensor box has a SSH private key set up on it: `ssh-keygen`.

### Step #2

Then make sure the public key for said private key is on the more powerful computer. You need to put it at the end of a file with a name like this:


/home/${user}/.ssh/authorized_keys


**NOTE:** ${user} is your user's name on the more powerful computer.

Also, make sure on the powerful computer, `/home/${user}/.ssh/` has the permissions 700 (`drwx------`), and `/home/${user}/.ssh/authorized_keys` has permissions 600 (`-rw-------`). You can use the `chmod` to set permissions.


$ chmod 700 /home/${user}/.ssh/
$ chmod 600 /home/${user}/.ssh/authorized_keys


### Step #3

Then, from the remote sensor computer, run something like:


$ ssh user@more-powerful-computer '/usr/local/bin/process_motion_event'

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cd9bc114c0d56e85a1d7803a8813b897