AlexGustafsson / homebridge-wol

A Wake on Lan plugin for Homebridge
MIT License
301 stars 30 forks source link

How to save ssh password? for power off MacBook #27

Closed aLAN-LDZ closed 7 years ago

aLAN-LDZ commented 7 years ago

Hi everything work perfect until I click power off (In console of home bridge in qnap I mast type the password :( how to save password only for power off commands?

AlexGustafsson commented 7 years ago

It is recommended to use SSH keys since storing the password will mean storing the password in plaintext. I've made the choice to not implement any solutions to shutdown devices within the plugin, rather make you able to run any regular shell command. As such, what you're facing isn't related to this plugin but networking in general.

That said, I'm happy to help. I think you should read up on how SSH works and how you can utilize RSA keys to login in without a password. Here's a link to get you started: https://www.ssh.com/ssh/public-key-authentication

If you face further troubles, I think Unix & Linux Stack Exchange or Superuser Stack Exchange would be a better place to ask questions like these. There are skilled people ready to help you on either of those sites.

aLAN-LDZ commented 7 years ago

yes I understand I need ssh key but I have one and don't have idea how to import it to qnap container with home bridge and this plugin :P

AlexGustafsson commented 7 years ago

I have no previous experience with Qnap so I'm going to advise you to visit either of the aforementioned sites.

Try asking a question like the following:

How do I set up SSH key authentication between a Qnap container and my macbook? I want to be able to SSH from Qnap to my MacBook without needing a password.

aLAN-LDZ commented 7 years ago

thx mate :)