Skip to content

DLPX-61319 Cloud-init fails to add authorized user ssh key#2

Merged
pzakha merged 1 commit into
delphix:masterfrom
pzakha:auth-key
Dec 4, 2018
Merged

DLPX-61319 Cloud-init fails to add authorized user ssh key#2
pzakha merged 1 commit into
delphix:masterfrom
pzakha:auth-key

Conversation

@pzakha
Copy link
Copy Markdown
Contributor

@pzakha pzakha commented Nov 12, 2018

See https://bugs.launchpad.net/cloud-init/+bug/1404060 for the launchpad bug.

On our internal-dev variants, 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 in sshd_config. However, since we have 2 entries for AuthorizedKeysFile in sshd_config instead 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

  1. Build cloud-init using the linux-pkg framework, and manually deploy it on an internal-dev system.
  2. run sudo cloud-init clean -lr to reboot the system and force cloud-init to re-run.
  3. The user key is now added to ~/.ssh/authorized_users and password-less ssh works.

@pzakha
Copy link
Copy Markdown
Contributor Author

pzakha commented Nov 29, 2018

Verified that a Delphix Appliance built with those changes can be accessed with passwordless ssh.

Built package available here: s3://dev-de-images/builds/jenkins-selfservice.pzakharov/devops-gate/master/linux-pkg-build/master/pre-push/41/cloud-init_18.4-delphix-2018.11.28.16_all.deb
DCOA group: pzakha-ab21-trunk

@pzakha pzakha merged commit 90e1170 into delphix:master Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants