mirror of
https://github.com/atmoz/sftp.git
synced 2024-12-22 13:14:42 -05:00
Merge branch 'Floyddotnet-patch-1'
This commit is contained in:
commit
e2e83abd9f
1 changed files with 19 additions and 0 deletions
19
README.md
19
README.md
|
@ -117,6 +117,25 @@ docker run \
|
|||
foo::1001
|
||||
```
|
||||
|
||||
## Using custom SSH key for server
|
||||
|
||||
This container will generate an ssh-key for OpenSSH at first run. To avoid this, you can map Ed25519 or RSA keys from the host inside the container.
|
||||
|
||||
```
|
||||
docker run \
|
||||
-v /host/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \
|
||||
-v /host/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \
|
||||
-v /host/share:/home/foo/share \
|
||||
-p 2222:22 -d atmoz/sftp \
|
||||
foo::1001
|
||||
```
|
||||
|
||||
Tip: you can generate keys with this commands:
|
||||
```
|
||||
ssh-keygen -t ed25519 -f /host/ssh_host_ed25519_key < /dev/null
|
||||
ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key < /dev/null
|
||||
```
|
||||
|
||||
## Execute custom scripts or applications
|
||||
|
||||
Put your programs in `/etc/sftp.d/` and it will automatically run when the container starts.
|
||||
|
|
Loading…
Reference in a new issue