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

SetUserSSHPublicKeysPlugin incorrect path for Windows Administrator user #162

Open
aacid opened this issue Dec 5, 2024 · 1 comment
Open

Comments

@aacid
Copy link

aacid commented Dec 5, 2024

Hello,
SetUserSSHPublicKeysPlugin is always populating ~/.ssh/authorized_keys with public key (if provided).
but this path is incorrect for Administrative users.
as explained here: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement#administrative-user

authorized keys for Administrator user should be stored in C:\ProgramData\ssh\administrators_authorized_keys, not in C:\Users\username\.ssh\authorized_keys.

this bug results in inability to connect using ssh key authentication as Administrator even when correct public key was provided to SetUserSSHPublicKeysPlugin.

@savchuk1985
Copy link

I think we need a new key for cloud-init config that will contain a list of SSH keys to add to this file.

Or maybe if the user is in the Administrators group, Cloudbase-Init should append their keys directly to C:\ProgramData\ssh\administrators_authorized_keys instead of creating C:\Users\username\.ssh\authorized_keys.

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