Puppet Class: almalinux_hardening::services::ssh::alive_interval

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

Summary

Set SSH Idle Timeout Interval

Overview

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

Examples:

include almalinux_hardening::services::ssh::alive_interval


26
27
28
29
30
31
32
33
34
35
36
# File 'manifests/services/ssh/alive_interval.pp', line 26

class almalinux_hardening::services::ssh::alive_interval inherits almalinux_hardening::services::ssh::service {
  if $almalinux_hardening::enable_ssh_alive_interval {
    file_line { 'ssh_alive_interval':
      ensure => 'present',
      path   => '/etc/ssh/sshd_config',
      line   => "ClientAliveInterval ${almalinux_hardening::ssh_alive_interval}",
      match  => '^(#|).*ClientAliveInterval.*.[0-9]*.*$',
    }
    ~> Service['sshd']
  }
}