Skip to content

Commit

Permalink
Configurable SSH Banner File
Browse files Browse the repository at this point in the history
  • Loading branch information
sidxz committed Nov 7, 2016
1 parent 2d11a0f commit 325fb9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
default['ssh']['print_motd'] = false # sshd
default['ssh']['print_last_log'] = false # sshd
default['ssh']['banner'] = false # sshd
default['ssh']['banner_path'] = '/etc/ssh/banner.txt' # sshd
default['ssh']['os_banner'] = false # sshd (Debian OS family)

# set this to nil to let us use the default OpenSSH in case it's not set by the user
Expand Down
2 changes: 1 addition & 1 deletion templates/default/opensshd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ X11UseLocalhost yes

PrintMotd <%= ((@node['ssh']['print_motd']) ? 'yes' : 'no' ) %>
PrintLastLog <%= ((@node['ssh']['print_last_log']) ? 'yes' : 'no' ) %>
Banner <%= @node['ssh']['banner'] ? '/etc/ssh/banner.txt' : 'none' %>
Banner <%= @node['ssh']['banner'] ? @node['ssh']['banner_path'] : 'none' %>
<% if @node['platform_family'] == 'debian' %>
DebianBanner <%= @node['ssh']['os_banner'] ? 'yes' : 'no' %>
Expand Down

0 comments on commit 325fb9c

Please sign in to comment.