-
Notifications
You must be signed in to change notification settings - Fork 739
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
Error: Missing privilege separation directory: /run/sshd #752
Comments
Can you confirm that the ssh-server is installed and running on the server? |
Huum, it was a little while ago. I did have a ssh-server installed (and probably running) as it was a remote server, but I may had zero active connections at the time as I was using a teleport SSH access instead. I eventually did a |
Since this doesn't happen in our tests or production environments, I don't think we a bigger problem here. |
@markuman, can you confirm that the ssh-server is installed and running on your instance? |
Yes, it is. |
I just tested it myself on Ubuntu 24.04. (ami-01e444924a2233b07) and it worked. I connected from outside the machine and only applied the ssh-hardening collection. @markuman, can you please provide which ami you did use and your playbook? |
It's
|
I can confirm this and the problem is this: https://discourse.ubuntu.com/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189
So, what should we do here? Start ssh? Fail the playbook early if ssh is not activated? Validate only if ssh is running? Document that ssh should be running? |
We could try one of the other validation options, maybe some of them will not need this directory (currently we are using
|
It does seem to work with |
Fresh install of 24.04LTS (latest current) inside a local VM, to which I connect via SSH to run the playbook, same issue:
How to get around this? EDIT what I did is:
|
@jeanmonet thank you very much, your input was valuable to identify a solution we want to implement. The next version of our collection won't need these kinds of workarounds |
Description
Running the role
ssh_hardening
on Debian 12.0 Bookworm seems to fail at theCreate sshd_config and set permissions to root/600
step.Reproduction steps
Current Behavior
Expected Behavior
Success.
OS / Environment
Debian GNU/Linux 12 (bookworm)
Ansible Version
Collection Version
Additional information
...
The text was updated successfully, but these errors were encountered: