Puppet Class: aix_tidy::ssh

Defined in:
manifests/ssh.pp

Overview

Aix_tidy::Ssh

Manage SSH config files with puppet

Parameters:

  • extra_config (Any) (defaults to: {})

    Extra configuration file settings

  • banner_message (Any) (defaults to: false)

    Banner message to display to users or false to disable

  • manage_x11_forwarding (Any) (defaults to: false)

    true to manage (..and disable) x11 forwarding else leave unmanaged

  • client_alive_interval (Any) (defaults to: undef)

    ClientAliveInterval setting for sshd_config

  • client_alive_count_max (Any) (defaults to: undef)

    ClientAliveCountMax setting for sshd_config



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'manifests/ssh.pp', line 11

class aix_tidy::ssh(
    $extra_config           = {},
    $banner_message         = false,
    $manage_x11_forwarding  = false,
    $client_alive_interval  = undef,
    $client_alive_count_max = undef,
) {

  $banner_file = "/etc/ssh/ssh_banner"

  file { "/etc/ssh/ssh_config":
    ensure => file,
    owner  => "root",
    group  => "system",
    mode   => "0644",
  }

  # Client protocol 2 only
  ssh_config { "Protocol":
    value  => "2",
  }

  # setup a banner if content passed in
  if $banner_message {
    file { $banner_file:
      ensure  => file,
      owner   => "root",
      group   => "root",
      mode    => "0644",
      content => $banner_message,
    }
    $manage_banner  = true
  } else {
    $manage_banner  = false
  }

  class { "ssh":
    extra_config           => $extra_config,
    banner                 => $banner_file,
    manage_banner          => $manage_banner,
    manage_x11_forwarding  => false,
    client_alive_interval  => client_alive_interval,
    client_alive_count_max => client_alive_count_max,
  }
}