DLPX-61319 Cloud-init fails to add authorized user ssh key#2
Merged
Conversation
Contributor
Author
|
Verified that a Delphix Appliance built with those changes can be accessed with passwordless ssh. Built package available here: |
prakashsurya
approved these changes
Nov 29, 2018
sebroy
approved these changes
Nov 30, 2018
11 tasks
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.
See https://bugs.launchpad.net/cloud-init/+bug/1404060 for the launchpad bug.
On our
internal-devvariants, we configure password-less login for DCOA instances by passing the user's ssh key to cloud-init.Cloud-init normally adds that key to the authorized_keys file for the default (
delphix) user, or to the file configured insshd_config. However, since we have 2 entries forAuthorizedKeysFileinsshd_configinstead of one, cloud-init gets confused and parses those 2 entries as a single long file name. As a result, it adds the key to that new file which is not parsed by sshd, and so password-less access doesn't work.Testing
linux-pkgframework, and manually deploy it on aninternal-devsystem.sudo cloud-init clean -lrto reboot the system and force cloud-init to re-run.~/.ssh/authorized_usersand password-less ssh works.