Linux

Execute remote commands on your linux machine via ssh and react to their response in Tasker.

Setting up Linux with AutoRemote:

  • Run sudo apt-get install curl in linux to install curl if you don’t already have it
  • Run the following command with your specific parameters: curl "http://autoremotejoaomgcd.appspot.com/registerpc?key=YOUR_KEY&name=NAME_TO_APPEAR_ON_YOUR_PHONE&id=ANY_UNIQUE_ID&type=linux&publicip=YOUR_PUBLIC_IP_OR_HOST_NAME&localip=$(sudo ifconfig eth0 |grep "inet addr" |awk '{print $2}' |awk -F: '{print $2}')"
  • To know how to get your personal key check here: http://joaoapps.com/autoremote/personal/
  • On your phone a popup should appear prompting you for your credentials. Enter a username and password that has remote access to your linux machine
  • You’re done! Now you can send linux commands to your machine and react to the response in Tasker.
  • Every linux response will be in the following format “linux=:=RESPONSE_HERE”. Set your AutoRemote message filters accordingly
  • As an example send the following message: “ls /” (that’s a lowercase “L”) and check the AutoRemote logs. A message starting with “linux=:=” should have been received containing the output of the command.
  • To send messages from your Linux just use the direct message method as described here: http://joaoapps.com/autoremote/direct/
  • With curl you can send messages like this: curl “http://autoremotejoaomgcd.appspot.com/sendmessage?key=YOUR_KEY&message=hi”
  • To know how you can generate the above URL look here.