From e34a4a23726f6a731dcad2b0af7f94f7e35697ab Mon Sep 17 00:00:00 2001 From: FXHibon Date: Mon, 17 Jul 2023 16:43:29 +0200 Subject: [PATCH] doc(sshd_config): update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 805a5163..ebf89be9 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Easy to use SFTP ([SSH File Transfer Protocol](https://en.wikipedia.org/wiki/SSH want them to upload files. - For consistent server fingerprint, mount your own host keys (i.e. `/etc/ssh/ssh_host_*`) - Override port - - The container will listen on the port 22 (default for sshd), but if for any reasons you want an another port to be used instead of the default, you can change it with the env var SSHD_PORT + - The container will internally listen on the port 22 (default port for sshd), but if for any reasons you want another port to be used internally instead of the default, you can change it with the env var SSHD_PORT # Examples @@ -66,6 +66,12 @@ sftp: command: foo:pass:1001 ``` +### Overriding the default port, so that sshd doesn't listen port 22 + +``` +docker run -e SSHD_PORT=1234 -p 1234:1234 -d atmoz/sftp foo:pass:::upload +``` + ### Logging in The OpenSSH server runs by default on port 22, and in this example, we are forwarding the container's port 22 to the host's port 2222. To log in with the OpenSSH client, run: `sftp -P 2222 foo@`