Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISA STIG updates for RHEL7 #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions manifests/sshd_config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,28 @@
$ciphers = undef,
$macs = undef,
$permitrootlogin = undef,
$strictmodes = undef,
$pubkeyauthentication = undef,
$permitemptypasswords = undef,
$passwordauthentication = undef,
$challengeresponseauthentication = undef,
$usepam = undef,
$x11forwarding = undef,
$useprivilegeseparation = undef,
$permituserenvironment = undef,
$compression = undef,
$clientaliveinterval = undef,
$clientalivecountmax = undef,
$usedns = undef,
$bannerpath = undef,
$match = undef,
$authorizedkeyscommand = undef,
$authorizedkeyscommanduser = undef,
$rhostsrsaauthentication = undef,
$hostbasedauthentication = undef,
$ignoreuserknownhosts = undef,
$ignorerhosts = undef,
$printlastlog = undef,
$internalsftp = false,
$template_dir = $::ssh::params::template_dir,
$service_name = $::ssh::params::service_name,
Expand Down
27 changes: 27 additions & 0 deletions templates/rhel7/sshd_config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ SyslogFacility AUTHPRIV
<% if @permitrootlogin -%>
PermitRootLogin <%= @permitrootlogin %>
<% end -%>
<% if @strictmodes -%>
StrictModes <%= @strictmodes %>
<% else -%>
#StrictModes yes
<% end -%>
#MaxAuthTries 6
#MaxSessions 10

Expand All @@ -90,13 +94,25 @@ AuthorizedKeysCommandUser <%= @authorizedkeyscommanduser %>

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
<% if @rhostsrsaauthentication -%>
RhostsRSAAuthentication <%= @rhostsrsaauthentication %>
<% end %>
# similar for protocol version 2
#HostbasedAuthentication no
<% if @hostbasedauthentication -%>
HostbasedAuthentication <%= @hostbasedauthentication %>
<% end %>
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
<% if @ignoreuserknownhosts -%>
IgnoreUserKnownHosts <%= @ignoreuserknownhosts %>
<% end %>
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
<% if @ignorerhosts -%>
IgnoreRhosts <%= @ignorerhosts %>
<% end %>

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
Expand Down Expand Up @@ -159,15 +175,26 @@ X11Forwarding yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
<% if @printlastlog -%>
PrintLastLog <%= @printlastlog %>
<% end %>
#TCPKeepAlive yes
#UseLogin no
<% if @useprivilegeseparation -%>
UsePrivilegeSeparation <%= @useprivilegeseparation %>
<% else -%>
UsePrivilegeSeparation sandbox # Default for new installations.
<% end -%>
<% if @permituserenvironment -%>
PermitUserEnvironment <%= @permituserenvironment %>
<% else -%>
#PermitUserEnvironment no
<% end -%>
<% if @compression -%>
Compression <%= @compression %>
<% else -%>
#Compression delayed
<% end -%>
<% if @clientaliveinterval -%>
ClientAliveInterval <%= @clientaliveinterval %>
<% end -%>
Expand Down