Skip to content

Commit e34a4a2

Browse files
committed
doc(sshd_config): update README.md
1 parent da094d5 commit e34a4a2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Easy to use SFTP ([SSH File Transfer Protocol](https://en.wikipedia.org/wiki/SSH
3131
want them to upload files.
3232
- For consistent server fingerprint, mount your own host keys (i.e. `/etc/ssh/ssh_host_*`)
3333
- Override port
34-
- 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
34+
- 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
3535

3636
# Examples
3737

@@ -66,6 +66,12 @@ sftp:
6666
command: foo:pass:1001
6767
```
6868

69+
### Overriding the default port, so that sshd doesn't listen port 22
70+
71+
```
72+
docker run -e SSHD_PORT=1234 -p 1234:1234 -d atmoz/sftp foo:pass:::upload
73+
```
74+
6975
### Logging in
7076

7177
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@<host-ip>`

0 commit comments

Comments
 (0)