Ssh into a docker using zerotier

I’m trying to create a docker I can ssh into using zerotier network, I’ve managed to spin up the docker, join zerotier network and all but I’m not able to ssh into the server (No route to host error) but funnily enough I can ssh from the docker to another host wich means the network is set up, leading me to think it’s a port issue

my current configuration involves:

on the dockerfile forwarding the port 22 to the port 22222
“sed -i ‘s/#Port 22/Port 22222/g’ /etc/ssh/sshd_config”
and exposing the port 22222
“EXPOSE 22222”

while on the PC I’ve opened the port 22222
“ufw allow 22222”

but as stated before when I try to log with
“ssh root@ip -p 22222”
I get the no route error

am I doing something wrong or something not supported by zerotier?

A couple quick questions:

  • Do you have ZT on the docker itself, or on the host the docker is attached to?
  • Can you ping the docker’s IP from the host you’re trying to SSH from?
  • What kind of network is the docker on? Host, Docker Network, etc…?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.