Cannot ssh from container to host

Running Ubuntu 20.04 on the host, Ubuntu 22.04 on the container. I installed lxd with snap. I used a macvlan profile to allow the container to get an IP from the local lan and I can reach other systems on the lan from the container and vice versa. However I cannot ssh to the host. The host has a mysql database that I would like to be able to access from an app on the container. I’m trying to set up a ssh tunnel to port 3306 on the host. Any ideas? ssh: connect to host port 22: No route to host

lxd is no longer part of the project. Questions about lxd should go to the Canonical forum: LXD - Ubuntu Community Hub

For more info: FAQ: LXD has been moved to Canonical - News - Ubuntu Community Hub


Anyway, it’s the same on Incus or LXD regarding MACVLAN : one limitation of MACVLAN is that, host cannot talk to VM/CT.

If you whish to do so, you may setup a bridge, plug your containers/VM into it, and then, be able to ‘talk’ to the host :slight_smile:

Best regards,


Done, thanks.