Solved: Remote XDebug from Dockerized PHP app via SSH Tunnel on Ubuntu and WSL
expose: - "9000" 1. Remove the ports: section from docker-compose.yml and define expose 2. On the remote machine enable GatewayPorts clientspecified in /etc/ssh/sshd_config (then restart the sshd service). 3. This allows you to create an SSH port forward tunnel which listens on all network