Skip to content

Commit

Permalink
Merge pull request #273 from ancoron/feature/ubuntu-dynamic-motd-banner
Browse files Browse the repository at this point in the history
Disable also dynamic MOTD via PAM if enabled - refs #271
  • Loading branch information
rndmh3ro committed Apr 18, 2020
2 parents 4a97d4d + b014b62 commit 3de3975
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tasks/hardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
notify: restart sshd
when: ssh_server_hardening | bool

- name: disable dynamic MOTD
pamd:
name: sshd
type: session
control: optional
module_path: pam_motd.so
state: absent
when:
- ssh_server_hardening | bool
- ssh_pam_support | bool
- not (ssh_print_motd | bool)

- name: create ssh_config and set permissions to root/644
template:
src: 'openssh.conf.j2'
Expand Down

0 comments on commit 3de3975

Please sign in to comment.