So, in summary - I have this command setup as a shell_command in Home Assistant. I checked the SSH options hoping there is way to reference a specific known_hosts file but came up empty handed.Įdit: I got it! Here is the command I use: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKe圜hecking=no -i /config/.ssh/id_rsa sh /home/km/testing.sh Once you add the host to known_hosts you should be fine. To fix this, I just updated TortoiseHG ( via web or choco install tortoisehg ), which in turn updated its internal version of SSL, which I presume was so old bitbucket retired it. You can confirm this by logging into your docker container as root and trying to connect the same way. I believe it is getting wiped out periodically from restarting. From within home assistant I can call on the shell command! It’s awesome, until I restart and have to do it again.Īnyway, I think we need to figure out a way to keep the known_hosts file persistent. After I type Yes and added it to known hosts I was able to run the command above perfectly. News The last version with python 2.7 support is 6.1.3. It also includes a Gnome/Nautilus extension and a CLI wrapper application so the TortoiseHg tools can be used on non-Windows platforms. Post reboot, the first time I tried to run the command from shell as root in docker I was prompted to add target machine, 192,168.1.200 to known_hosts. TortoiseHg is a Windows shell extension and a series of applications for the Mercurial distributed revision control system. Everything works great, until I reboot.Īfter reboot I get same error as you, 255. I’m no longer prompted for a password when I log into docker as root and run the above command since I copied the private key to /config directory. ssh -i /config/.ssh/id_rsa sh /home/km/testing.sh In my case I gave up running the scripts on my HASSIO host (Ubuntu virtual machine)įrom my docker container I run the following command which connects to another server, referencing a private key and then run a script on it. I’m also trying to call SH scripts from Home Assistant (HASSIO in docker). shellcommand: turnoffpc: ssh -o StrictHostKe圜heckingno -o ServerAliveInterval1 -o ServerAliveCountMax1 -i /config/.ssh/idrsa userip 'shutdown /h' When i run this command from the terminal addin it works flawlessly, no password prompt and within a few moments the pc is hibernating. ! ! ! ! !Īllows you to shut down Windows Computers with a service call from Home Assistant. If you’re attempting to shutdown a Windows machine, check out this add-on: home-assistant/hassio-addons/blob/master/rpc_shutdown/README.md # Home Assistant Add-on: RPC Shutdown Yes, there are fairly restrictive limitations due to running in a docker environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |