Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide example SFTP_USERS usage. #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>`
Expand Down