[solved] Getting dropbear ssh service running on Host

Running 4.17 in a Vbox VM in bridge mode

I would like to be able ssh to the host box (as opposed to using virtualboxUI and “show”).

After rooting around looks like dropbear is loaded for ssh?

It looks like systemd is used and I found a service for dropbear and when I do status it says it needs an authorized_keys file. Ok so I made a file in /root/.ssh and set mode to 600 but here is the rub. I can’t get copy/paste in the VM UI host session so no way to get my public key in there (too long type obviously…arh). I haven’t had any success getting vbox guest additions loaded that may enable copy/paste. If maybe I could configure dropbear to use a root with a password I could get in long enough to get my public key set but if I try to edit the /etc/systemd/system/dropbear.d/hassos.conf file I can’t as apparently most of the root filesystem is locked down “readonly file system” (except maybe /root as I could make the authorized keys file there). Besides root has no password set so that idea is maybe sunk already.

Oh well just stuck.

Just to be clear I am not talking about ssh to HA container that I already can do via addon with the container exposing port 222 to the VM which is then bridged to static IP on the physical machine

just needed to rtfm on the developer docs.

Have to use a usb stick to so this per https://developers.home-assistant.io/docs/operating-system/debugging/

BUT… you have to get the vbox extensions loaded correctly so that your physical usb can be mounted inside the guest HASSOS VM. The HOST (machine hosting virtualbox) might mount your usb by default so unmount if it does.
Don’t forget to go into the UI and navigate to the Supervisor system page and choose “Import from USB”. (it’s in the hamburger under HOST SYSTEM)

Once you do this successfully and are able to remote in you can remove the usb and reboot the vm as a test. The authorized_keys file you had on this stick will be copied to /root/.ssh and you are good to go!!!

also if HA is not running or you are having trouble from the UI you can run systemctl restart hassos-config at the # prompt instead from the vm terminal.

I have done this a few times now and it can be finicky. You need to be sure the usb is not mounted in the host os and you might need to plug in and out a few times before it get recognized in HASSOS