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

Cannot disable PasswordAuthentication due to /ssh_config.d/50-cloud-init.conf #5934

Open
Isabellent opened this issue Dec 15, 2024 · 1 comment
Labels
bug Something isn't working correctly incomplete Action required by submitter

Comments

@Isabellent
Copy link

Bug report

Hello,
First thx for your answers.
The issue is /ssh_config.d/50-cloud-init.conf witch override my ssh_config and i cannot disable PasswordAuthentication to use only the pubkey. I don't have access to it, it's like the file doesn't exist.

Steps to reproduce the problem

  1. I have just installed the last ubuntu srv version into a desktop wipped.
  2. Then tried to adapted the ssh config to disable the PasswordAuthentication ...
  3. So both (pubkey and PasswordAuthentication ) still working.
  4. it's seems that the 50-cloud-init.conf (PasswordAuthentication yes) override my ssh_config (PasswordAuthentication no). I founded by doing a grep PasswordAuthentication into /etc/ssh.
  5. i tried to modified it, but i don't find it.
  6. I tried to add ``ssh_pwauth: falseinto/etc/cloud.cfg.d/newfile.cfg``` witch crash my ssh , so canceled.
  7. I tried to comment the line Include /etc/ssh/ssh_config.d/* , not working , both still working.

Environment details

  • Cloud-init version:/
  • Operating System Distribution: Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-50-generic x86_64)
  • Cloud provider, platform or installer type: /
  • Features: any snaps features installed during the server installation

cloud-init logs

@Isabellent Isabellent added bug Something isn't working correctly new An issue that still needs triage labels Dec 15, 2024
@TheRealFalcon
Copy link
Member

cloud-init doesn't write 50-cloud-init.conf by default. It should only write it if it receives user-data to do so.

If you are certain there is no custom configuration being applied to your instance to set SSH password authentication, please attach the results of cloud-init collect-logs here.

@TheRealFalcon TheRealFalcon added incomplete Action required by submitter and removed new An issue that still needs triage labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly incomplete Action required by submitter
Projects
None yet
Development

No branches or pull requests

2 participants