How to communicating between 2 machines running docker

So i have a setup where i have 2 devices
both devices are running ziti-host, compose files:

services:
  ziti-host:
    container_name: ziti-edge-tunnel
    image: docker.io/openziti/ziti-host
    restart: unless-stopped
    network_mode: host
    privileged: true
    volumes:
      - /home/user/ziti:/ziti-edge-tunnel
    environment:
      ZITI_ENROLL_TOKEN: <token>

i can see both devices in zac as registered and online
i’m exposing thru a service port 22 on device A(Debian 12), and allowing device B(Debian 12) to dial it.
basically i want to be able to ssh from device B to A
when doing it i get ssh: Could not resolve hostname backup.ziti: Name or service not known

if i try to ssh into device A from my machine(after adding the role to the identity) i manage to connect to it, the main difference being that on my machine i installed the tunneler directly not by running the ziti-host container
is it possible to have this kind of setup where ziti works from a container in both client and server?
i assume there might be a need to change some dns settings somewhere

Could you have a look at this very recent thread and see if it's exactly what you need? I think it'll come down to how you declare that service and using the "network_mode" option. Dialing from a containerised service Also mentioned in that thread is the official doc that shows an example or two Deploy the Router with Docker | NetFoundry Documentation

Looking at your example, you're not using another container with proper intercept capabilities. You'll need that.

Hope that helps?