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

Commit

Permalink
Merge pull request #77 from tsenart/remove-banner
Browse files Browse the repository at this point in the history
Parameterise Banner and DebianBanner as defaults
  • Loading branch information
Sebastian Gumprich authored Oct 24, 2016
2 parents 224ecf0 + c315a65 commit 1f63b35
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ ssh_print_motd: false # sshd
# false to disable display of last login information
ssh_print_last_log: false # sshd

# false to disable serving /etc/ssh/banner.txt before authentication is allowed
ssh_banner: false # sshd

# false to disable distribution version leakage during initial protocol handshake
ssh_print_debian_banner: false # sshd (Debian OS family only)

# true to enable sftp configuration
sftp_enabled: false

Expand Down
2 changes: 0 additions & 2 deletions templates/openssh.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# This is the ssh client system-wide configuration file.
# See ssh_config(5) for more information on any settings used. Comments will be added only to clarify why a configuration was chosen.
#
# Created for OpenSSH v5.9

# Basic configuration
# ===================

Expand Down
11 changes: 5 additions & 6 deletions templates/opensshd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

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

# Basic configuration
# ===================
Expand Down Expand Up @@ -200,10 +198,11 @@ PrintMotd {{ 'yes' if ssh_print_motd else 'no' }}

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

#Banner /etc/ssh/banner.txt
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
Banner {{ '/etc/ssh/banner.txt' if ssh_banner else 'none' }}

{% if ansible_os_family == 'Debian' %}
DebianBanner {{ 'yes' if ssh_print_debian_banner else 'no' }}
{% endif %}

{% if sftp_enabled %}
# Configuration, in case SFTP is used
Expand Down

0 comments on commit 1f63b35

Please sign in to comment.