Skip to content

Commit

Permalink
doc(sshd_config): update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FXHibon committed Jul 17, 2023
1 parent da094d5 commit e34a4a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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>`
Expand Down

0 comments on commit e34a4a2

Please sign in to comment.