how can I log in to the host system of Home Assistant OS when running it as a virtual machine? The procedure described at Debugging the Home Assistant Operating System | Home Assistant Developer Docs does not work.
I have also tried GitHub - adamoutler/HassOSConfigurator: A set of Add-Ons to configure HassOS For various platforms and development purposes. but without any success.
I have then tried to check the virtual disk image outside of the VM, but it does have 8 partitions and I’m not really sure which one does what and not sure what should I place where to start the ssh server on the host.
Also, until recently the host OS could be accessed via login command from within the ssh session through the HA SSH plugin, too bad that I didn’t create a backdoor back then Now it asks for a username and password and it rejects root login.
Can anyone help please?
The easiest way is to use something like VNC to access the VM’s console. I use a KVM and it’s easy to configure it to expose a VNC server where you can watch the boot process or login as “root”. If you’re using a desktop VM like Virtualbox, you should already have access to the VM console locally.
I’m not following this part:
Also, until recently the host OS could be accessed via login command from within the ssh session through the HA SSH plugin, too bad that I didn’t create a backdoor back then Now it asks for a username and password and it rejects root login.
You should already be at a shell prompt when you log in via SSH, no additional “login” required. As long as you’re using the SSH & Web Terminal addon for SSH, you can disable “Protected Mode” and access several components that are typically restricted to the host OS, such as nmcli and docker.
Sorry I was probably too distracted, yes I use the VNC console usually, that’s where the “login” came from, when I log in as root from the VNC console, it gives me the ha > prompt and then when I type login, I get the root shell (unrestricted, with the possibility of running docker commands) and I was trying that login from within the ssh shell where it doesn’t work and asks for a username instead. That’s why I got confused
Anyway, I didn’t know that I can disable protected mode in the SSH addon. How can I do that? I can’t see any config option to disable protected mode.
You need to use the community SSH & Web Terminal addon, and perhaps you’re currently using the official Terminal & SSH addon (which doesn’t support it).