Open telekosmos opened 5 years ago
Did you protected your hostkey with a password? If so this might be the reason. (was it for me)
@epandasa you mean protect the key with a passphrase when generating with ssh-keygen
? if so, no, I took care not to add further complications in this stage...
yeah thats what i meant.
you might have to place your key for the authentication in /home/foo/.ssh/keys/ (inside the container)
Hey @telekosmos ssh_host_rsa_key_2048 is a host (servers') key, you cannot use it for login.
Hello @telekosmos, maybe the docs are incorrect. Can you mount the public key instead of the private key? I think it should work.
-v <host-dir>/ssh_host_ed25519_key.pub:/home/foo/.ssh/keys/ssh_host_ed25519_key.pub:ro
Hi I've followed the instructions in Readme (https://github.com/atmoz/sftp#providing-your-own-ssh-host-key-recommended) to connect using generated SSH host key without providing password. So, the procedure was just like follows:
ssh-keygen -t rsa -b 2048 -f ./ssh_host_rsa_key_2048 < /dev/null
ssh-keygen -t ed25519 -f ./ssh_host_ed25519_key < /dev/null
then
docker run -v /Users/<user>/tmp/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key:ro -v /Users/<user>/tmp/ssh_host_rsa_key_2048:/etc/ssh/ssh_host_rsa_key_2048:ro -v /Users/<user>/tmp:/home/foo/tmp -p 2222:22 -d atmoz/sftp:latest foo::1001
but then I try to sftp and
dunno why.
Docker logs:
I double checked with one of my mates but we didn't see anything despite I'm sure I'm forgetting something.
So, anything wrong above??? Any help is appreciated.