eilandert / dockerized

dockerized stuff
https://hub.docker.com/u/eilandert
15 stars 8 forks source link

issue with ssh keys in reprepro image #18

Open brianhenson opened 10 months ago

brianhenson commented 10 months ago

I am trying to use the image reprepro and when I use the ssh keys it keeps saying Permission denied (publickey). I have double, triple and quadruple checked the key and even generated new ones to see if it will work. Got any ideas how to make this work? I love the image outside that one little bug.

eilandert commented 10 months ago

Hi, I don't use this image myself anymore, I switched to aptly about 2 years ago.

Maybe the sshd_config file should some modification? Could you take a look at https://github.com/eilandert/dockerized/blob/master/reprepro/repo/conf/sshd_config and see if thats correct? I don't see anything wrong with it

I added ssh-createkeys.sh and some lines in /sh/start.sh (inspired on my aptly container)

create sshd keys if needed (absent on first run)

bash /ssh-createkeys.sh 1>/dev/null chmod 600 /repo/ssh/*.key chmod 644 /repo/ssh/*.pub chmod 600 /repo/ssh/authorized_keys chown root:root -R /repo/ssh

I hope this helps