From c18de0964e0100855d21ed0170720416b23340c2 Mon Sep 17 00:00:00 2001 From: Jan Fabian Radon Date: Wed, 30 Mar 2022 15:11:12 +0200 Subject: [PATCH] fix example usage with certificats --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b82c907..e9932d6 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,9 @@ This container will generate new SSH host keys at first run. To avoid that your docker run \ -v /ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \ -v /ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \ + -v /ssh_host_ed25519_key.pub:/home/foo/.ssh/keys/ssh_host_ed25519_key.pub:ro \ + -v /ssh_host_rsa_key.pub:/home/foo/.ssh/keys/ssh_host_rsa_key.pub:ro \ + -v /sftp_home:/home/foo/share \ -v /share:/home/foo/share \ -p 2222:22 -d atmoz/sftp \ foo::1001 @@ -131,7 +134,11 @@ Tip: you can generate your keys with these commands: 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 /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.