I'm trying to execute a shell command in my Dockerized Home Assistant that SSHs into a remote Raspberry Pi, primarily to trigger Squeezelite from the HA server. However, even when I run the container in host network mode, I still can't reach any devices on my local network. Interestingly, I can SSH from the server outside of the container without any issues. Any ideas on what might be going wrong?
3 Answers
Have you considered using Tailscale? It allows SSH over Tailscale, which might help you connect without direct LAN access.
You might want to run a traceroute to see if the packets are being dropped somewhere. When using host networking, your container should essentially have the same IP as your host. It's worth checking if they coordinate correctly.
That’s pretty odd, since host mode should let your container work as though it’s on the host network itself. Have you tried pinging the Raspberry Pi from inside the container? Sometimes SSH fails because of the 'known hosts' prompt or if you forgot to mount your SSH keys into the container.

Related Questions
Google Nest Doorbell Not Alerting Google Hub Or Google Mini
Can't Rename Google Nest Doorbell