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

keymaker AuthorizedKeysCommand ignored on amazon-linux-2 #51

Open
quagly opened this issue Dec 21, 2018 · 2 comments
Open

keymaker AuthorizedKeysCommand ignored on amazon-linux-2 #51

quagly opened this issue Dec 21, 2018 · 2 comments

Comments

@quagly
Copy link

quagly commented Dec 21, 2018

ISSUE: The AuthorizedKeysCommand is ignored on amazon-linux-2

ROOT CAUSE: Amazon-Linux-2 includes its own AuthorizedKeysCommand in preparation for an upcoming feature for storing public keys in metadata. See release notes under "OpenSSH daemon configuration file /etc/ssh/sshd_config updates" sshd only honors the first AuthorizedKeysCommand entry.

RESOLUTION:
Comment out the existing entries or put keymaker entries first

@quagly
Copy link
Author

quagly commented Dec 22, 2018

Resolved this for myself with this following cfn-init.

I do not recommend that keymaker handle this issue as keymaker cannot know why someone may have existing entries. If we agree I will close the issue.

              # authorized keys from sshd_config conflicts with keymaker sshd config
              comment-out-authorized-keys:
                command: "sed -e '/^AuthorizedKeysCommand/ s/^/#/' -i /etc/ssh/sshd_config"
                ignoreErrors: "false"```

@kislyuk
Copy link
Owner

kislyuk commented Mar 19, 2019

Interesting, thank you for the link to the release notes. It looks like AWS is looking to implement the equivalent of Keymaker in Amazon Linux :)

I agree Keymaker in its current form is not ready to deal with the presence of other AuthorizedKeysCommands. I'll keep this issue open to track what (if anything) should be done in that case.

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

No branches or pull requests

2 participants