SSH service name based on distro, Ubuntu ssh upstart issue, repeated keyword on ssh_config#9
Closed
tcana1 wants to merge 4 commits intogchef:masterfrom
tcana1:master
Closed
SSH service name based on distro, Ubuntu ssh upstart issue, repeated keyword on ssh_config#9tcana1 wants to merge 4 commits intogchef:masterfrom tcana1:master
tcana1 wants to merge 4 commits intogchef:masterfrom
tcana1:master
Conversation
…fig. Some cloud images (i.e vagrant chef/centos-6.5) have sshd_config files that list a keyword more than once, with and without a comment. The old 'sed -i' statement would replace all occurrences of said keyword, often breaking ssh. This change removes all instances of the keyword and adds a new one at the end of the file.
Author
|
This has been tested on Ubuntu12.04 LTS (hashicorp/precise32) and 14.04 LTS (ubuntu/trusty64), CentOS 6.5 (chef/centos-6.5) and Fedora 20 (chef/fedora-20) |
|
+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes 4 separate issues:
metadata.rbfor compatibilityChef::Provider::Service::Upstartprovider when restarting the service on Ubuntu 13 and upsshd_confighas duplicated keywords (say with #commented out) the sed command will replace both, often causing ssh to break.This is an example I ran into for item 4:
Original sshd_config file
Modified after Ched run