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

Provide example SFTP_USERS usage.

This commit is contained in:
jeff-h 2021-02-23 12:27:54 +13:00 committed by GitHub
parent f735906a35
commit ebd64292fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,20 @@ sftp:
command: foo:pass:1001
```
Using the `SFTP_USERS` environment variable with multiple users:
```
sftp:
image: atmoz/sftp
volumes:
- <host-dir>/upload-one:/home/foo/upload
- <host-dir>/upload-two:/home/bar/upload
ports:
- "2222:22"
environment:
- SFTP_USERS=foo:pass1:1001 bar:pass2:1002
```
### 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>`