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

ec2-data: /etc/ssh owned by "755" #347672

Closed
basbebe opened this issue Oct 10, 2024 · 4 comments · Fixed by #347678
Closed

ec2-data: /etc/ssh owned by "755" #347672

basbebe opened this issue Oct 10, 2024 · 4 comments · Fixed by #347678
Labels
0.kind: bug Something is broken

Comments

@basbebe
Copy link

basbebe commented Oct 10, 2024

Describe the bug

#340489 seems to have introduced two lines that apply a chown where a chmod seems to have been intended.

This makes VMs using that module unavailable via SSH since permissions are incorrect.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Build NixOS config using unstable branch and ec2-data (e.g. openstack-config)
  2. Switch
  3. check permissions of /etc/ssh

Expected behavior

/etc/ssh and root/.ssh should be owned by root and have permissions of 0755 / 0700

Notify maintainers

@r-vdp


Add a 👍 reaction to issues you find important.

@basbebe basbebe added the 0.kind: bug Something is broken label Oct 10, 2024
@r-vdp
Copy link
Contributor

r-vdp commented Oct 10, 2024

Oh that's my fault, I'll make a PR to fix that. Thanks for reporting.

@WilliButz
Copy link
Member

Authentication refused: bad ownership or modes for directory /etc/ssh

Quoting the sshd log message in case anyone else is looking for why they locked themselves out of their boxes

@arianvp
Copy link
Member

arianvp commented Oct 14, 2024

Thanks for the fix

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants