Skip to content

Commit

Permalink
[sshd] Ensure that '/run/sshd' directory exists
Browse files Browse the repository at this point in the history
There is an issue in certain LXC containers where after configuring
sshd, it fails to restart due to the '/run/sshd' directory missing. This
is caused by sshd using systemd socket activation in this environments,
and the directory being removed when the last session is closed.

This is a short them solution before the role is redesigned to take the
new configuration into account.

(cherry picked from commit 71e23a3)
  • Loading branch information
drybjed committed Jan 18, 2023
1 parent 80d3ce8 commit 16f7795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ General

- The password length can now be set using a number, not just a string.

:ref:`debops.sshd` role
'''''''''''''''''''''''

- The role will make sure that the :file:`/run/sshd/` directory exists on all
hosts, to fix issues with :command:`sshd` daemon not restarting properly.

:ref:`debops.sysctl` role
'''''''''''''''''''''''''

Expand Down
1 change: 0 additions & 1 deletion ansible/roles/sshd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
path: '/run/sshd'
state: 'directory'
mode: '0755'
when: ansible_service_mgr != 'systemd'

- name: Ensure OpenSSH support is installed
apt:
Expand Down

0 comments on commit 16f7795

Please sign in to comment.