0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-11-24 12:59:24 -05:00

doc(sshd_config): update README.md

This commit is contained in:
FXHibon 2023-07-17 16:43:29 +02:00
parent da094d5b12
commit e34a4a2372

View file

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