William Myers
10/18/2022, 10:19 PMSlackbot
10/18/2022, 10:20 PMLumiere
10/18/2022, 10:25 PMLumiere
10/18/2022, 10:25 PMSlackbot
10/18/2022, 10:26 PMWilliam Myers
10/19/2022, 12:34 AMWilliam Myers
10/19/2022, 2:15 AMWilliam Myers
10/19/2022, 2:19 AMsmortex
10/19/2022, 2:52 AMWilliam Myers
10/19/2022, 3:04 AMWilliam Myers
10/19/2022, 3:04 AMSlackbot
10/19/2022, 8:53 AMbastelfreak
10/19/2022, 8:58 AMvchepkov
10/19/2022, 1:11 PMUgo Bellavance
10/19/2022, 3:22 PMjhoblitt
10/19/2022, 4:36 PMjhoblitt
10/19/2022, 4:37 PMSlackbot
10/19/2022, 5:38 PMJordan Mueller
10/19/2022, 5:39 PMWilliam Myers
10/19/2022, 11:00 PM# @summary A short summary of the purpose of this class
#
# Configures the sshd service for my homelab
# Requires the ssh module from puppet forge
# <https://forge.puppet.com/modules/saz/ssh>
#
# @example
# include sshd_config::configure_sshd
class config_sshd (
String $ssh_protocol,
String $ssh_Port,
String $ssh_PasswordAuthentication,
String $ssh_PermitRootLogin,
String $ssh_ChallengeResponseAuthentication,
String $ssh_ChrootDirectory,
String $ssh_UsePAM,
String $ssh_AllowTcpForwarding,
String $ssh_X11Forwarding,
String $ssh_LoginGraceTime,
String $ssh_MaxAuthTries,
String $ssh_MaxSessions,
String $ssh_MaxStartups,
String $ssh_KexAlgorithms,
String $ssh_ciphers,
String $ssh_PrintMotd,
# String $ssh_Include,
) {
if $::osfamily =~ /^(Debian|RedHat)$/ {
# load the ssh module
class { 'ssh':
storeconfigs_enabled => false,
server_options => {
'protocol' => $config_sshd::ssh_protocol,
'Port' => $config_sshd::ssh_Port,
'PasswordAuthentication' => $config_sshd::ssh_PasswordAuthentication,
'PermitRootLogin' => $config_sshd::ssh_PermitRootLogin,
'ChallengeResponseAuthentication' => $config_sshd::ssh_ChallengeResponseAuthentication,
# 'ChrootDirectory' => $config_sshd::ssh_ChrootDirectory,
'UsePAM' => $config_sshd::ssh_UsePAM,
'AllowTcpForwarding' => $config_sshd::ssh_AllowTcpForwarding,
'X11Forwarding' => $config_sshd::ssh_X11Forwarding,
'LoginGraceTime' => $config_sshd::ssh_LoginGraceTime,
'MaxAuthTries' => $config_sshd::ssh_MaxAuthTries,
'MaxSessions' => $config_sshd::ssh_MaxSessions,
'MaxStartups' => $config_sshd::ssh_MaxStartups,
'KexAlgorithms' => $config_sshd::ssh_KexAlgorithms,
'ciphers' => $config_sshd::ssh_ciphers,
'PrintMotd' => $config_sshd::ssh_PrintMotd,
# 'Include' => $config_sshd::ssh_Include,
},
}
}
}William Myers
10/19/2022, 11:01 PM# @summary A short summary of the purpose of this class
#
# Configures the sshd service for my homelab
# Requires the ssh module from puppet forge
# <https://forge.puppet.com/modules/saz/ssh>
#
# @example
# include sshd_config::configure_sshd
class config_sshd (
String $ssh_protocol,
String $ssh_Port,
String $ssh_PasswordAuthentication,
String $ssh_PermitRootLogin,
String $ssh_ChallengeResponseAuthentication,
String $ssh_ChrootDirectory,
String $ssh_UsePAM,
String $ssh_AllowTcpForwarding,
String $ssh_X11Forwarding,
String $ssh_LoginGraceTime,
String $ssh_MaxAuthTries,
String $ssh_MaxSessions,
String $ssh_MaxStartups,
String $ssh_KexAlgorithms,
String $ssh_ciphers,
String $ssh_PrintMotd,
# String $ssh_Include,
) {
if $::osfamily =~ /^(Debian|RedHat)$/ {
# load the ssh module
class { 'ssh':
storeconfigs_enabled => false,
server_options => {
'protocol' => $config_sshd::ssh_protocol,
'Port' => $config_sshd::ssh_Port,
'PasswordAuthentication' => $config_sshd::ssh_PasswordAuthentication,
'PermitRootLogin' => $config_sshd::ssh_PermitRootLogin,
'ChallengeResponseAuthentication' => $config_sshd::ssh_ChallengeResponseAuthentication,
# 'ChrootDirectory' => $config_sshd::ssh_ChrootDirectory,
'UsePAM' => $config_sshd::ssh_UsePAM,
'AllowTcpForwarding' => $config_sshd::ssh_AllowTcpForwarding,
'X11Forwarding' => $config_sshd::ssh_X11Forwarding,
'LoginGraceTime' => $config_sshd::ssh_LoginGraceTime,
'MaxAuthTries' => $config_sshd::ssh_MaxAuthTries,
'MaxSessions' => $config_sshd::ssh_MaxSessions,
'MaxStartups' => $config_sshd::ssh_MaxStartups,
'KexAlgorithms' => $config_sshd::ssh_KexAlgorithms,
'ciphers' => $config_sshd::ssh_ciphers,
'PrintMotd' => $config_sshd::ssh_PrintMotd,
# 'Include' => $config_sshd::ssh_Include,
},
}
}
}kenyon
10/19/2022, 11:05 PMinclude ssh (via a list of classes in hiera) and set ssh::server_options in common.yamlSlackbot
10/19/2022, 11:06 PMWilliam Myers
10/19/2022, 11:07 PMWilliam Myers
10/19/2022, 11:08 PMSlackbot
10/19/2022, 11:09 PMSlackbot
10/20/2022, 12:06 AMSlackbot
10/20/2022, 4:05 AMSlackbot
10/20/2022, 12:12 PMCVQuesty
10/20/2022, 1:32 PM