Get root SSH access to the Home Assistant root system remotely (no USB drive needed) ssh into the host system
There are detailed instructions on how to get “root” ssh access to the Home Assistant Operating System but it involves plugging in a USB Drive and importing the SSH keys from that one.
On this page
However: I’m 36 hours away from the system I want root SSH access to! So physical access is just not possible right now, but fear not! there is a solution!
- Install the port 22222 configurator addon
- Configure the addon
- Start the addon
- Done!
Adding a custom repository
and add the following repository
https://github.com/adamoutler/HassOSConfigurator
Now refresh the page you are on (F5 / CMD + R) and locate our new add-ons
Setting up the addon before starting it
before we start the addon we have to configure some things, head over to the configuration of the addon
Put in your public RSA key generated from your private key
(ignore me) personal note: https://medium.com/@rajeshkanna_a/ssh-public-key-and-private-key-generation-windows-fdd8f87d4a9 ssh-keygen -y -f hassio.pem > hassio.pub
Reboot HassOS / Home Assistant Operating System
Reboot your raspberry pi / reboot HassOS
Settings > System > Hardware > Reboot Host
Optional: upload/get your private key on home assistant
now you can SSH into the root system from inside Home Assistant
chmod 400 /config/certs/hassio ssh -p 22222 -i config/certs/hassio localhost