docker-traefik
docker-traefik copied to clipboard
Exposing SSH Port 22 for SFTP via Traefik
Hey all,
I am currently wrestling with exposing port 22 of my Synology server via traefik's tcp routers in order to provide sftp capabilities when on the go.
The only helpful resource I have found so far is this: https://community.containo.us/t/routing-ssh-traffic-with-traefik-v2/717
However, implementing this solution does not seem to work for me - I configured port 22 as ssh entrypoint, and used tcp routers in order to forward traffic to port 22 of my server, but something does not work correctly.
I adjusted the entry point in our general docker-compose file:
- --entryPoints.ssh.address=:22
My toml file looks as follows:
[tcp.routers]
[tcp.routers.mount-rtr]
entryPoints = ["ssh"]
rule = "HostSNI(`*`)"
service = "mount-svc"
middlewares = ["chain-no-auth"]
[tcp.services]
[tcp.services.mount-svc]
[tcp.services.mount-svc.loadBalancer]
passHostHeader = true
[[tcp.services.mount-svc.loadBalancer.servers]]
address = "192.168.0.122:22//"
Could anyone kindly point me in the right direction/to a useful part of the documentation to debug/solve this problem?
Thanks!
Hello @rondobohrens ,
have you tried a different port (e.g. 2222)? My guess is that Synology has the SSH daemon listening on port 22 so Traefik cannot use the same port as entry-point.
GZ
@rondobohrens Did you ever get this working?
Unfortunately no, I just circumvented it and expose it on another domain that I do not manage with traefik. But I will probably also try my luck with Guacamole in the next weeks.