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

Commit e1710eb

Browse files
author
Sebastian Gumprich
committed
Merge branch 'master' into check_selinux_module
2 parents 4e3d09f + 1f63b35 commit e1710eb

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

defaults/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ ssh_print_motd: false # sshd
6969
# false to disable display of last login information
7070
ssh_print_last_log: false # sshd
7171

72+
# false to disable serving /etc/ssh/banner.txt before authentication is allowed
73+
ssh_banner: false # sshd
74+
75+
# false to disable distribution version leakage during initial protocol handshake
76+
ssh_print_debian_banner: false # sshd (Debian OS family only)
77+
7278
# true to enable sftp configuration
7379
sftp_enabled: false
7480

templates/openssh.conf.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# This is the ssh client system-wide configuration file.
44
# See ssh_config(5) for more information on any settings used. Comments will be added only to clarify why a configuration was chosen.
55
#
6-
# Created for OpenSSH v5.9
7-
86
# Basic configuration
97
# ===================
108

templates/opensshd.conf.j2

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
# This is the ssh client system-wide configuration file.
44
# See sshd_config(5) for more information on any settings used. Comments will be added only to clarify why a configuration was chosen.
5-
#
6-
# Created for OpenSSH v5.9
75

86
# Basic configuration
97
# ===================
@@ -200,10 +198,11 @@ PrintMotd {{ 'yes' if ssh_print_motd else 'no' }}
200198

201199
PrintLastLog {{ 'yes' if ssh_print_last_log else 'no' }}
202200

203-
#Banner /etc/ssh/banner.txt
204-
#UseDNS yes
205-
#PidFile /var/run/sshd.pid
206-
#MaxStartups 10
201+
Banner {{ '/etc/ssh/banner.txt' if ssh_banner else 'none' }}
202+
203+
{% if ansible_os_family == 'Debian' %}
204+
DebianBanner {{ 'yes' if ssh_print_debian_banner else 'no' }}
205+
{% endif %}
207206

208207
{% if sftp_enabled %}
209208
# Configuration, in case SFTP is used

0 commit comments

Comments
 (0)