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

Do not hash public keys #23

Merged
merged 1 commit into from
Dec 1, 2014

Conversation

chr4
Copy link
Contributor

@chr4 chr4 commented Apr 30, 2014

Hashes are different on each ssh-keyscan run, therefore filling up /etc/ssh/ssh_known hosts

An alternative would be, to only check for duplicate keys (not comments), but this would result in problems for hosts with multiple hostnames/ips.

Hashes are different on each ssh-keyscan run, therefore filling up
/etc/ssh/ssh_known hosts
@pniederlag
Copy link

this is a real show-stopper that should be improved/fixed.

@chr4
Copy link
Contributor Author

chr4 commented Jul 2, 2014

Any news on this, dear Opscode? This should be affecting tons of users.

@hulu1522
Copy link

For those of you having an issue, the only way I could figure out to stop this was to use a "not_if" guard with the resource.

ssh_known_hosts_entry 'some.domain.com' do
  not_if "a=$(ssh-keyscan -H -t rsa some.domain.com | grep -Po '(AAAA.*)'); grep $a #{node['ssh_known_hosts']['file']}"
end

As long as that DNS name is reachable it will scan for the key and then check the file for the key. This is what worked for me but may not work for you. I figured I would post it anyways.

cwebberOps added a commit that referenced this pull request Dec 1, 2014
Do not hash public keys. This fixes #31
@cwebberOps cwebberOps merged commit 00c2f92 into chef-cookbooks:master Dec 1, 2014
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.

4 participants