Issues reaching tcp service from outside

I've been trying to setup an sftp server provided by a docker container.
I checked that it indeed worked on the docker network using another container hooked to the network, and that I could access the web admin interface through traefik.

Here is the error message I get:

 sftp -P 2222
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer

One curious thing I noticed but do not understand, is that docker ps does not display a port for this container, while it does for my other containers:

ee0a6c7f9ea1        gitea/gitea:1.9.6                      "/usr/bin/entrypoint…"   11 hours ago        Up 11 hours         22/tcp, 3000/tcp       gitea
cf9160bc5fd3        postgres:9.6                           "docker-entrypoint.s…"   11 hours ago        Up 11 hours         5432/tcp               gitea_db
1c956e51b0b8        drakkan/sftpgo:v2.1.2-alpine-slim      "sftpgo serve"           11 hours ago        Up 11 hours                                ftp

Below is my config:

    container_name: ftp
    image: drakkan/sftpgo:v2.1.2-alpine-slim
      - traefik_default
      - "traefik.enable=true"
      - "traefik.tcp.routers.ftp.rule=HostSNI(`*`)"
      - "traefik.tcp.routers.ftp.entrypoints=sftp" # entrypoint listens to port 2222
      - ""
      - "traefik.tcp.routers.ftp.tls.certresolver=myhttpchallenge" # tried with & without tls or passthrough, no luck

      - "traefik.http.routers.uiftp.rule=Host(``)" # this part is working as intended
      - "traefik.http.routers.uiftp.entrypoints=websecure"
      - "traefik.http.routers.uiftp.tls.certresolver=myhttpchallenge"
      - ""

    external: true

Thanks for reading !

Remove this entirely, it is not a 'TLS' protocol.

1 Like

Crap, it works now !
Guess when I removed / re-added I had another issue ongoing, thank you !

1 Like

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