I found an example on how to setup ssh behind traefik and it works fine if I leave it on port 22, when I try to change the port to another port I can no longer connect. Can someone have a peak at my file and see if I have missed something.
22:22
ssh -T git@localhost -p 22
git@localhost: Permission denied (publickey).
2224:22
ssh -T git@localhost -p 2224
ssh_exchange_identification: Connection closed by remote host
version: "3"
services:
edge:
image: traefik:v2.1.3
command:
- --providers.docker
- --entrypoints.http.address=:80
- --entrypoints.ssh.address=:**2224**
- --api
ports:
- "80:80"
- "8080:8080"
- "**2224**:22"
labels:
- "traefik.enable=false"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
gitea:
image: gitea/gitea:1.9
environment:
- USER_UID=1000
- USER_GID=1000
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea-web.rule=Host(`localhost`)"
- "traefik.http.routers.gitea-web.entrypoints=http"
- "traefik.http.routers.gitea-web.service=gitea-web-svc"
- "traefik.http.services.gitea-web-svc.loadbalancer.server.port=3000"
- "traefik.tcp.routers.gitea-ssh.rule=HostSNI(`*`)"
- "traefik.tcp.routers.gitea-ssh.entrypoints=ssh"
- "traefik.tcp.routers.gitea-ssh.service=gitea-ssh-svc"
- "traefik.tcp.services.gitea-ssh-svc.loadbalancer.server.port=22"