I’m running CentOS 7 VMs and open source Docker. I want to SSH to Docker containers from other VMs or other Docker containers. How do I do this?
I can SSH from the Docker containers to their shared host VM. I cannot SSH into the Docker containers from the host VM because of an error “Connection refused.” I cannot SSH to the Docker containers from the containers themselves because of “connection refused.” nmap results show that ports 1 through 1000 are closed but not filtered on each container. I tested against the IP address in the result of a docker inspect command.
I can ping the Docker containers from each other using their IP addresses. sftp between the containers fails because of “connection refused.” Given that there is no firewall rule on port 22, what is causing this “connection refused” problem?