-
Notifications
You must be signed in to change notification settings - Fork 925
SSH Client On motionEyeOS
You may want to run remote commands from within motionEyeOS using the ssh command, on another machine. Note that this is not about logging in remotely into motionEyeOS.
-
Generate a key pair for your motion motionEyeOS. On motionEyeOS, run the following command (hit whenever asked something):
ssh-keygen -f /data/etc/ssh_id_rsa -
Configure the SSH client so that it reads the identity from the newly created private key:
echo "IdentityFile /data/etc/ssh_id_rsa" >> /data/etc/ssh_config -
Tell your SSH client to store known hosts data on the writable partition:
echo "UserKnownHostsFile /data/etc/ssh_known_hosts" >> /data/etc/ssh_config -
Optionally, but recommended: copy your motionEyeOS's public key and add it to your other machine's
~user/.ssh/authorized_keysfile:cat /data/etc/ssh_id_rsa.pub -
Test the setup; it should run the
ls -lcommand remotely without asking for a password (will ask you to confirm the authenticity of the remote host once, though):ssh user@otherhost ls -l -
If everything worked as expected, you can use the command above (tweaked to your needs) in the "Run A Command" options of motionEye.