It took a while to figure this out, so I might as well document this. Looking at the amount of search hits on this subject, I wasn’t not the only one that needed access to the host itself.
When debugging an issue related to the OS or docker, you might need access to the host itself. The Terminal & SSH Add-on drops you in a container, while this might be enough for users, you sometimes want to access the real operating system, to examine some docker issue for example.
There is a well written documentation on how to do this here: https://developers.home-assistant.io/docs/operating-system/debugging/ but this only works nicely when you are running HA on a Raspberry Pi. When running HA in a VM like on Proxmox, it’s more difficult to map an USB stick to be able to copy the file. Note that these steps below do the exact same thing as the copy does.
- You’ll first need to login to the host itself, trough the host console. You can do this from within the interface of Proxmox. Just open the console, and login with
root, you don’t need a password. Then, use
loginto drop to a shell. This is enough to access the host shell, but since the console doesn’t work nicely, we want to continue to enable SSH.
- Now, I assume you are already running the Terminal & SSH Add-on, and have it configured with your public key. Go to your .ssh directory by running
cd /root/.ssh/, and next, copy the authorized_keys file to the host. You can do this with
docker cp addon_core_ssh:/root/.ssh/authorized_keys .(Note the single dot at the end of the command). To be sure, give it the right permissions, but this should already be the case.
chmod 600 authorized_keys
- Finally, you’ll need to start dropbear. You can do this with
service start dropbear.
- You can now connect to your host with
ssh [email protected] -p 22222. Replace the hostname if needed.
I’m sorry if this has already been mentioned somewhere else, but I couldn’t find it. I might add it to the docs at https://developers.home-assistant.io/docs/operating-system/debugging/ sometime, but since it’s quite an advanced topic, it might not be that usefull.