🆕[add-on] HassOS SSH port 22222 Configurator

From a fresh install on a Raspberry Pi 4, I configured my public key as per the instructions and performed a hard reboot. After the reboot, I was immediately able to login, even before the Web UI was available.

1 Like

As shown above, it goes into the HassOS SSH port 22222 Configurator Configuration screen.

Home Assistant may reformat it to look like this

@adamoutler I have no expertise to know if this addon is technically good or has security implications, but if it stops the endless questions about accessing the host system it is more than welcome.

3 Likes

Yes. This addon violates the security model of home assistant, docker containers, and add-ons in general. The entire purpose of containerization is to contain an application and the entire purpose of this application is to remove the containment and modify the host system so that you can log in and modify the host system.
I’m positive this is a bad idea for security reasons. But, like you said. It’s intended to let people get on to hacking rather than ask endless questions in the forums.

5 Likes

I made some security changes by removing app armor. No need to Disable Security anymore.
from this:


to this:

What does this mean? I linked putty to the private key. I am able to connect to 22222, put in root as user and then I get this popup.

image

Looks like you put in the wrong public key. It’s easier to use WSL and apt install ssh, then understand what’s up with ssh -v [email protected]. I’m pretty sure you used the wrong key based on this though.

I copied everything here, put in in configuration and ran the add on.

image

Did you start/restart the addon and reboot after?

Yes. I tried a 3rd time to make new key combo again, now getting this error when trying to start add on. image

Yah, I dunno WTH is going on now. I didnt get that 500 server error the first 2 times I did it.

Uninstalled add-on, restarted HA, installed add on, tried again. 500 error

I’ll try again on a fresh machine tomorrow after I finish some tasks. It’s working for me.

@adamoutler, is this only available for arm? From https://github.com/adamoutler/HassOSConfigurator/blob/553195ec4728503ac17b38df6a187f6641119a1c/HassOsEnableSSH/config.json

 "arch": ["armhf", "armv7", "aarch64"],

I unplugged my HA device,as opposed to just restart, and the add-on worked again. But still no dice, connecting.

heres my config

Honestly I am just trying to get access to add an xml config file to the openzave config folder because it hasnt been added to official repo yet. Apparently I need host access so gave this a try, but Im spending too much time on it, lol. Ill just wait for repo to be updated.

You don’t have an sda1, sd1b, or mmcblk0p1 config.txt. What are you using? Is this windows? When you put a terminal app into Disable Protection Mode, what is the result of ls /dev/?

Currently your system is not supported, but I’d like it to be.

If you can show me an instance of HassOS on x86 with an sda1 “boot” partition, I will support it.

@adamoutler are you asking me? I am using home assistant blue (ODroid N2). But as I said, once I killed power to my device and then restored power and started the machine back up, I was able to use the add-on again. I still dont have access on 22222, but ill just wait for repo to be updated.

1 Like

Can you set your terminal addon to Disable Security, then run the following

ls /dev
mkdir /dev/sda1
mount /dev/sda1 /tmp/sda1
ls -alR /dev/sda1

I would like to see the output from the terminal. I can likely support your device with this.

@adamoutler

1 Like

Thanks, but it’s missing most of the devices. If you don’t feel comfortable posting all that text here, you can dump it into pastebin.adamoutler.com, hit ctrl+s then copy the resulting link in here. I need to see the devices so I know what to target. Basically, I need to see the entire result of ls /dev