How to get to OS level from HA CLI in terminal

Hi

Just a note, not the least to myself for future reference :wink: on how to move from the HA CLI to OS level in terminal.

I had issues login root from home assistant CLI. Login incorrect was all I got all the time, even though I used the Advanced SSH & Web Terminal and had the Protection Mode turned off.

What did the trick for me was to use this in HA CLI

bash nsenter -t 1 -m -u -i -n -p -- sh

This got me out of the HA container and in to the OS level.

This was needed in my case in order to update my RaspBee device, works the same for the ConBee device too.

1 Like

Could you reformat this using the quote symbol in the editor? The last part looks like a long dash followed by “sh” but not sure… but if one did a copy-n-paste into the command line shell, it fails.
I think you mean to say that the command is nsenter -t 1 -m -u -i -n -p sh

1 Like

Thanks for noticing! Fixed it!

I copy-pasted that one too, but didn’t work.

~ $ bash nsenter -t 1 -m -u -i -n -p -- sh
/usr/bin/nsenter: /usr/bin/nsenter: cannot execute binary file