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

authorizeSSHKeyAdmin function fails to check for missing %ProgramData%\ssh folder leading to excessive error logs #154

Open
3 tasks
lukasfazik opened this issue Dec 10, 2024 · 0 comments

Comments

@lukasfazik
Copy link

Description

The function authorizeSSHKeyAdmin does not check if the folder %ProgramData%\ssh exists when writing the administrators_authorized_keys file. By default, this folder does not exist in some Windows client or server versions.

This creates unnecessary errors in the log file.

To reproduce

  • Prepare a fresh Windows VM with the affected Windows version
  • Install OpenNebula context version 6.10.0-2
  • Add SSH public key into context
  • Add WINADMIN = "YES" context variable
  • Wait 30+ seconds for context to run and pick up the changes
  • See the Set-Content : Could not find a part of the path 'C:\ProgramData\ssh\administrators_authorized_keys'. error in %SYSTEMDRIVE%.onecontext\opennebula-context.log file and that no %ProgramData%\ssh folder was created with the administrators_authorized_keys inside

Details

  • Affected Component: context-windows
  • Version: 6.10.0-2

Additional context

Possible solutions

  • Write a proper error message into the log when a folder does not exist
  • Create the %ProgramData%\ssh folder

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
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

1 participant