File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 7171default [ 'ssh' ] [ 'allow_groups' ] = [ ] # sshd
7272default [ 'ssh' ] [ 'print_motd' ] = false # sshd
7373default [ 'ssh' ] [ 'print_last_log' ] = false # sshd
74+ default [ 'ssh' ] [ 'banner' ] = false # sshd
75+ default [ 'ssh' ] [ 'os_banner' ] = false # sshd (Debian OS family)
76+
7477# set this to nil to let us use the default OpenSSH in case it's not set by the user
7578default [ 'ssh' ] [ 'use_dns' ] = nil # sshd
7679# set this to nil to let us detect the attribute based on the node platform
Original file line number Diff line number Diff line change @@ -177,7 +177,12 @@ X11UseLocalhost yes
177177
178178PrintMotd <%= ((@node['ssh']['print_motd']) ? 'yes' : 'no' ) %>
179179PrintLastLog <%= ((@node['ssh']['print_last_log']) ? 'yes' : 'no' ) %>
180- #Banner /etc/ssh/banner.txt
180+ Banner <%= @node['ssh']['banner'] ? '/etc/ssh/banner.txt' : 'none' %>
181+
182+ <% if @node['platform_family'] == 'debian' %>
183+ DebianBanner <%= @node['ssh']['os_banner'] ? 'yes' : 'no' %>
184+ <% end %>
185+
181186<% if @node['ssh']['use_dns'].nil? %>
182187# Since OpenSSH 6.8, this value defaults to 'no'
183188#UseDNS no
You can’t perform that action at this time.
0 commit comments