Newbie with Home Assistant, and first forum post.
I’ve installed the SSH plugin, and it seems to work, but not as I expected.
If I connect in from the web, using the terminal icon on the dashboard, it logs me in as root, which I’m not convinced is a good thing.
I’ve altered the configuration to give the hassio user a password, and then tried SSH’ing from a terminal window on a Ubuntu box (much as I would to any of my other RasbPis). I can connect in as hassio using the password that I supplied it with, but when I’ve logged in, whoami says that I’m root not hassio. This seems wrong to me.
I’ve also tried creating a new user (e.g. adduser newuser), and whilst that appears to be successful, I can’t SSH in as that user, if always rejects the password. I’ve deluser’d it and tried again, but I still get the same result.
Once connected, If I su to either hassio or newuser, that appears to work (whoami confirms).
Is there something else I should be configuring ?
TIA
Adrian
Hi,
If this is a HAOS install, then remember the difference between the host OS, and the HA container itself.
HAOS is deliberately locked down (unless you enable developer mode). If you want a general purpose OS, then you take the responsibility to admin a container or supervised install.
The Terminal & SSH Add-On logs me in with a $
cursor, but whoami
reports root
- just a very limited admin within a container, on a locked-down host OS (and another layer of IPv4 / IPv6).
If this helps,
this post!
1 Like
Thanks James.
That explains some of what is going on, which is very useful.
However, looking at the links you kindly provided, I’m not sure that it helps me to get where I want to be. In addition to the Pi hosting Home Assistant, I’ve got 8 other Pis running, and on all of those I’ve got a set of scripts that carry out basic health check stuff (CPU temperature, free memory, SD usage etc.) which gets sent to my web server on a daily basis, and produces a set of graphs and a summary. I’d like to be able to add this Pi to that set up. I think I can get some of that from the dashboard, but is automating the collection, and scp’ing it to my web server possible ?
Adrian
I have seen “health check” sensors for HA somewhere, but personally, I use a remote server running mosquitto_sub
in a BASH script to collect HA-published data and alert if no changes.
HA has access to the RPi hardware sensors so can publish to something like MQTT. My suspicion is someone has already gone wild with something like grafana.
SCP is very likely in there too - if not an official add-on, look in …
Thanks again. I’ve just had a quick look at the HACS stuff. Do I really have to sign up to Github to use it ?
Adrian
GitHub is where the HACS manifests and code is stored, so if there is something in there you want to install, yes. Check the main HA docs first for other monitoring integrations though. There are alternatives like WebHooks.
If you do install HACS, brace for several HA restarts, and the (updated) HACS install is in two stages - install the installer, then install HACS itself.
Off topic, but, I like a few HACS ‘specials’ such as:
Spook is great for spotting and repairing renamed entities.
Thanks. More stuff to think about.
Adrian