Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit 3de3975

Browse files
authored
Merge pull request #273 from ancoron/feature/ubuntu-dynamic-motd-banner
Disable also dynamic MOTD via PAM if enabled - refs #271
2 parents 4a97d4d + b014b62 commit 3de3975

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tasks/hardening.yml

+12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@
4141
notify: restart sshd
4242
when: ssh_server_hardening | bool
4343

44+
- name: disable dynamic MOTD
45+
pamd:
46+
name: sshd
47+
type: session
48+
control: optional
49+
module_path: pam_motd.so
50+
state: absent
51+
when:
52+
- ssh_server_hardening | bool
53+
- ssh_pam_support | bool
54+
- not (ssh_print_motd | bool)
55+
4456
- name: create ssh_config and set permissions to root/644
4557
template:
4658
src: 'openssh.conf.j2'

0 commit comments

Comments
 (0)