Skip to content

Add 'StrictHostKeyChecking no' to ssh config for ec2.internal hosts - #4431

Merged
philbogle merged 1 commit into
stagingfrom
no_strict_key_checking_internal
Oct 13, 2015
Merged

Add 'StrictHostKeyChecking no' to ssh config for ec2.internal hosts#4431
philbogle merged 1 commit into
stagingfrom
no_strict_key_checking_internal

Conversation

@philbogle

Copy link
Copy Markdown
Contributor

Add 'StrictHostKeyChecking no' to the ssh config for ec2.internal hosts, eliminating the need for users to manually accept connections to new internal hosts.

We rely in many places on Amazon's internal IP routing not being compromised by man-in-the-middle attacks, so this is not the security risk it might first appear to be.

@philbogle

Copy link
Copy Markdown
Contributor Author

Hmm, I just tried this recipe and it didn't update /home/ubuntu/.ssh/config as expected. In fact that file, doesn't match the old version of this file either. Which file is actually updated by the ssh_config.erb?

@wjordan

wjordan commented Oct 9, 2015

Copy link
Copy Markdown
Contributor

the cdo-users cookbook applies updates for our list of Chef users on gateway instance. e.g. will@gateway.code.org:/home/will/.ssh/config will be updated by this cookbook change.

For the frontend instances, it looks like the ubuntu@frontend:/home/ubuntu/.ssh/config file is managed only by the cdo-github-access cookbook. Specifically, it seems that the node['cdo-github-access']['config'] Chef attribute contains the contents of the .ssh/config file for these instances. We currently override this attribute on the baseline role, here is what the knife command displays:

will@gateway:~$ knife role show baseline -a override_attributes.cdo-github-access.config
baseline:
  override_attributes.cdo-github-access.config: Host github.com
    StrictHostKeyChecking no

Updating this override attribute through knife or the Chef management console should do the trick for updating the frontend ssh configs.

@philbogle

Copy link
Copy Markdown
Contributor Author

I updated the attribute as Will suggested and this now deploys correctly on production-daemon.

Let's go ahead and check this in for the nodes where it does apply; will have Josh review.

@philbogle philbogle assigned joshlory and unassigned wjordan Oct 13, 2015
@joshlory

Copy link
Copy Markdown
Contributor

I don't have a good way to validate this change, but LGTM if it applies correctly on production-daemon.

@philbogle

Copy link
Copy Markdown
Contributor Author

Yes, tested that this works as expected.

philbogle added a commit that referenced this pull request Oct 13, 2015
…ernal

Add 'StrictHostKeyChecking no' to ssh config for ec2.internal hosts
@philbogle
philbogle merged commit 1bd0833 into staging Oct 13, 2015
@philbogle
philbogle deleted the no_strict_key_checking_internal branch October 13, 2015 20:53
deploy-code-org added a commit that referenced this pull request Oct 13, 2015
commit 745b543
Merge: 3f60151 7d64872
Author: Caley Brock <caleybrock7@gmail.com>
Date:   Tue Oct 13 14:10:46 2015 -0700

    Merge pull request #4528 from code-dot-org/state-style-fix

    State page fixes

commit 3f60151
Merge: 1bd0833 3c0f10b
Author: Trevor Berg <trevor@code.org>
Date:   Tue Oct 13 14:06:29 2015 -0700

    Merge pull request #4530 from code-dot-org/fix-debug-icon

    Fix font size on debug icon

commit 1bd0833
Merge: 53bfb7a 21a71cb
Author: philbogle <phil@code.org>
Date:   Tue Oct 13 13:53:10 2015 -0700

    Merge pull request #4431 from code-dot-org/no_strict_key_checking_internal

    Add 'StrictHostKeyChecking no' to ssh config for ec2.internal hosts

commit 3c0f10b
Author: Trevor Berg <trevor@code.org>
Date:   Tue Oct 13 13:51:51 2015 -0700

    Fix font size on debug icon
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

Successfully merging this pull request may close these issues.

3 participants