Puppet Class: almalinux_hardening::services::ssh::user_env

Inherits:
almalinux_hardening::services::ssh::service
Defined in:
manifests/services/ssh/user_env.pp

Summary

Do Not Allow SSH Environment Options

Overview

Puppet Module to perform AlmaLinux 8 OS Hardening with CIS benchmark. Copyright © 2022 Jonas Hügli

Examples:

include almalinux_hardening::services::ssh::user_env


18
19
20
21
22
23
24
25
26
27
28
# File 'manifests/services/ssh/user_env.pp', line 18

class almalinux_hardening::services::ssh::user_env inherits almalinux_hardening::services::ssh::service {
  if $almalinux_hardening::enable_ssh_user_env {
    file_line { 'ssh_user_env':
      ensure => 'present',
      path   => '/etc/ssh/sshd_config',
      line   => "PermitUserEnvironment ${almalinux_hardening::ssh_user_env}",
      match  => '^(#|).*PermitUserEnvironment.*.(yes|no).*$',
    }
    ~> Service['sshd']
  }
}