From HACS: Add https://github.com/zhbjsh/homeassistant-ssh as custom repository and look for the SSH integration.
From Github: Download the latest release and copy the custom_components/ssh folder from the zip file to config/custom_components/ on your Home Assistant installation.
Configuration
You can find all the details in the link below. If you have any questions, dont hesitate to ask!
Bugs
Please let me know if anything is not working as it should or if you have any ideas or suggestions for improvements. This is my first integration for Home Assistant, so I’m happy about any kind of feedback!
Seem promising, but it’s stuck on “Please wait, starting configuration wizard for ssh” when I’m adding integration. Any advice how to increase log level? Default log viewer is empty
Hi @p1ne, usually it takes a couple seconds to install the dependencies when you open the integration for the first time (depending on your internet connection).
If it takes too long, you could try to set the default log level to debug by adding the following to configuration.yaml (don’t forget to change it back later):
logger:
default: debug
Then try to add the SSH integration again and (after waiting for some time) search for ssh-terminal-manager in the log file. For me it looks like this, maybe yours will show some additional information.
Let me know if you can make it work! If not, please send me some information about your system (OS, Home Assistant version, Python version, etc.) and how you installed the integration (HACS or manually).
Ok, in that case maybe you could set the log level to debug and check if there is any message like “Ping request failed”, that could give us some clue…
I released a new version yesterday (v0.9.4) which fixes a couple small bugs and adds some new sensors to display more information about the device:
To use the new sensors, you have to remove your SSH devices from Home Assistant and add them again after installing the new version. If you made any changes to the commands, please copy them to a text file before deleting the device!
For the next release I’m planning to add a feature to automatically backup and update the commands to make this more convenient in the future.
I add my hosts with a regular user (mhoogenbosch in my case) they are not root users but are able to sudo. The command, for example /sbin/shutdown -r doesn’t allow regular users to trigger. Adding sudo in front of the command results in a question for the password, so don’t think that’ll work. Any thoughts on this?
the temp sensor of my homeassistant server doesn’t show. It is a Debian 12 installation on which supervised HA is installed. The command you are using for getting the temp sensor is:
I will try a new command for the temperature sensor to make it look at all the files in /sys/class/thermal, probably this week when I have time.
About the sudo problem I need to do some more research, the only solutions I can come up with are not very safe, either you send the password with the command:
echo <PASSWORD> | sudo -S /usr/sbin/shutdown -r now
Or you store it in a text file on the host machine and use it like this:
sudo -S /usr/sbin/shutdown -r now < password.txt
I will let you know if I can figure out a better way…