Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing fingerprint between container lifetimes #12

Open
DanielVoogsgerd opened this issue Sep 9, 2020 · 2 comments
Open

Changing fingerprint between container lifetimes #12

DanielVoogsgerd opened this issue Sep 9, 2020 · 2 comments

Comments

@DanielVoogsgerd
Copy link

I recently started using this docker container. Everything works perfectly fine, until I restart the docker container. Due to the nature of docker the fingerprint is regenerated and I get warnings that the fingerprint does not match. This is completely correct, but maybe not the desired behaviour.

@Hermsi1337
Copy link
Owner

Hermsi1337 commented Sep 10, 2020

Hey @DanielVoogsgerd, I'm glad you're using my image - I hope you like it (=

The dir /etc/ssh is declared as a volume in the Dockerfile - therefore the fingerprints should persist, as long as it is the same container.

In order to get the fingerprints surviving multiple container lifecycles, you could mount the /etc/ssh to a dir somewhere on your machine:

$ docker run --rm --volume /persist/fingerprints/here:/etc/ssh hermsi/alpine-sshd

Does this solution fit your requirements?

Best regards!

@DanielVoogsgerd
Copy link
Author

Thanks for the reply!

I assume that would persist more than just the host keys, right? Maybe also something to include in the README.md. I would gladly have helped, but I'm quite busy in the foreseeable future. My apologies.

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants