Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Force SSH host-key generation #3

Closed
wants to merge 1 commit into from

Conversation

nickseibert
Copy link

Added a service start & stop after initial ssh install, to force the service to initialize its host-keys.

Added a service start & stop after initial ssh install, to force the service to initialize its host-keys.
@jdeathe
Copy link
Owner

jdeathe commented May 22, 2015

Every time the image is built the host-key is changed so I don't see it's value. In the documentation I recommend connecting with the option StrictHostKeyChecking=no

@nickseibert
Copy link
Author

Oh good to know. I was just trying to silence the log warning.

Hey thanks BTW for posting this; it's been super helpful and I probably
would've given up on docker already if I hadn't found your project on github

-Nick

On Fri, May 22, 2015 at 12:42 PM, James Deathe notifications@github.com
wrote:

Every time the image is built the host-key is changed so I don't see it's
value. In the documentation I recommend connecting with the option
StrictHostKeyChecking=no


Reply to this email directly or view it on GitHub
#3 (comment).

@jdeathe
Copy link
Owner

jdeathe commented May 23, 2015

In the case of containers we want to ignore the host key as images get re-built and containers are going to get destroyed and recreated. As such host key checking becomes frustrating. The ssh-bootstrap script is used to initialise SSH and generates the host keys. https://github.com/jdeathe/centos-ssh/blob/master/etc/ssh-bootstrap#L31

We want to minimise the build steps of an image because each step adds to the overall size of the image and, when you start chaining together Dockerfile builds you will find there is a limit on the total number of build steps.

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

Successfully merging this pull request may close these issues.

2 participants