0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2025-03-09 15:16:00 -04:00

fix example usage with certificats

This commit is contained in:
Jan Fabian Radon 2022-03-30 15:11:12 +02:00 committed by GitHub
parent ffeb104bee
commit c18de0964e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,9 @@ This container will generate new SSH host keys at first run. To avoid that your
docker run \
-v <host-dir>/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \
-v <host-dir>/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \
-v <host-dir>/ssh_host_ed25519_key.pub:/home/foo/.ssh/keys/ssh_host_ed25519_key.pub:ro \
-v <host-dir>/ssh_host_rsa_key.pub:/home/foo/.ssh/keys/ssh_host_rsa_key.pub:ro \
-v <host-dir>/sftp_home:/home/foo/share \
-v <host-dir>/share:/home/foo/share \
-p 2222:22 -d atmoz/sftp \
foo::1001
@ -132,6 +135,10 @@ ssh-keygen -t ed25519 -f ssh_host_ed25519_key < /dev/null
ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key < /dev/null
```
Test it with:
sftp -P 2222 -i <host-dir>/ssh_host_ed25519_key -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null foo@localhost
## Execute custom scripts or applications
Put your programs in `/etc/sftp.d/` and it will automatically run when the container starts.