Remote Computer Skill

How to install Mycroft Remote Computer Skill

A skill to control a remote computer via SSH and Wake on Lan. (Power OFF/ON)
  • Install Remote Computer Skill by …

    • mycroft-msm install https://github.com/smearumi/mycroft-remote-computer.git
    • you can install via Installer Skill from web interface (https://home.mycroft.ai/#/skill).
    • It will take several minutes for installing requirements.
  • Remote Computer Skill connects to Remote Computer.

    • You can configure this skill via web interface (home.mycroft.ai). After a few minutes of having the skill installed, you should see configuration options in the https://home.mycroft.ai/#/skill location.
    • Fill this out with your appropriate information and hit save.
    • OR If you desire total privacy, please edit your config file located at:
      ~/.mycroft/mycroft.conf If it does not exist, create it. This file must be contain a valid json, add the following to it:
      "RemoteComputerSkill": {"ip_address": "YOUR IP ADDRESS", "mac_address": "YOUR MAC ADDRESS", "port": 22, "user": "USER NAME", "user_password": "USER PASSWORD", "sudo_password": "ROOT PASSWORD"}

How to test Remote Computer Skill

  • Configure the Remote Computer Skill Settings in home.mycroft.ai
  • Speak turn off my computer
  • Mycroft should ask for confirmation. After confirming by saying yes, mycroft should shut down your remote computer and should response your computer is off.

Where feedback on Remote Computer Skill should be directed a

Feedback will be apriciated here or through Issues on GitHub.

2 Likes

very nice skill.

You could enhance the skill by having a list of hostname, user, pass, and let the skill self find he ip and mac adreses.

And then mr. Mycroft could turn on and off more computers

“Hey Mycroft - turn off computer surface”
“Hey Mycroft - turn of gaming computer”
where surface and gaming is hostnames of computeres on the network.

Maybe he should be asking to confirm, so you dont turn off wrong computer…He sometimes hears badly, and I have experenced that he turnd of all light when I only asked him to turn off outside light :wink:

I would like it to control IPads to, so I could turn off my daughters Ipad, when she uses it to much :wink: But hassnt found a way to do that yet.

1 Like

Thanks, that’s a great idea. I’ll try to implement that. :grinning:

i would never put my sudo password on the web config

please provide a way to read it from mycroft.conf

self.skill_config = self.config.get("RemoteComputerSkill", {})
sudo = self.skill_config.get("sudo_pwd") or self.settings.get("sudo_pwd")
4 Likes

Thanks for pointing out the total privacy issue. Now the skill can read from “mycroft.conf” locally also. But is it feasible for general users? Or should I develop an agent which will be installed as service on remote device and mycroft will communicate with that agent? In that case sudo password can be stored in remote device. Got the idea from here: https://www.triggercmd.com/

I have been trying to find a way to get ip address from host name over local network, still didn’t find any. If you know anything about it then please let me know. Also, regarding mycroft “confirmation”, I’ll add that very soon. :slight_smile:

“confirmation” has been added. please check and test it. :slight_smile: Regards.

@smearumi, when you say “get ip address from host name over local network” do you mean like this example from stackoverflow? https://stackoverflow.com/a/34573360/537243

For safe-ish control, but not a full agent, what do you think about having this prerequisite for the skill:
creating a special user on your computer named mycroft_remote_control, have it login with SSH key only, and give it a special shell, perhaps lshell


https://linux.die.net/man/1/lshell
and also giving a very limited PAM configuration so that the user can only perform that limited list of shutdown, reboot, etc. commands.