My setup is Linux host with SSH and SFTP access. It runs inside a docker container exposing also SSH and SFTP. The docker container does not have a separate network. Uses “host” network setting.
I want to make it possible to access docker container via SFTP from a remote machine. When I access using SFTP port 2222, it connects to the host but not to the docker.
How I configure both host and container in a such way that I can access container from remote machine using SFTP?
22and2222, and only forward ssh to22to2222in the container? What is the reason for doing that, can you please describe what you're architecture is, and what you're trying to achieve with it as an end result, rather than just asking how do a set thing?