Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0 < 5.0.0
- ,
Tasks:
- test
Start using this module
Add this module to your Puppetfile:
mod 'kb-openssh_server', '0.0.3'
Learn more about managing modules with a PuppetfileDocumentation
openssh_server
table of contents
- overview
- module description – what the module does and why it is useful
- setup – the bascics of getting started with openssh_server
- usage – configuration options and additional functionality
- reference – an under-the-hood peek at what the module is doing and how
- limitations – OS compatiblity, and cetera
- development – guide for contributing to the module
overview
This module handles an openssh-server
.
module description
This module installs, configures, and starts the openssh-server
.
setup
what openssh_server
affects
Package['openssh_server']
(optional)File['openssh_server_preseed']
(optional)File['sshd_config']
(optional)File['sshd_no_start']
(optional)Service['sshd']
(optional)
setup requirements
You need at least PP 4.2.
beginning with openssh_server
Ensure the openssh-server package is present,
and the sshd(8)
service is running
(leaves the distributed configuration in place):
class ssh_server {
class { 'openssh_server':
}
}
usage
See examples/
.
reference
- class reference
- type reference
- there are no functions
classes
public classes
openssh_server
: the basis classopenssh_server::params
: holds defaults for the basis class
private classes
openssh_server::install
: performs the installationopenssh_server::config
: distributes the configuration filesopenssh_server::service
: manages theService['sshd']
parameters
Structured overview:
- package
- preseed
sshd_config
filesshd
servicesshd_config
contentsshd_config_commentary_track
sshd_config_preamble
- incoming
- what to listen on
- what to accept
- who are we
- response
- don't know where to sort in
- authentication methods
- global policy which authentication methods are accepted
- authentication chains
- authentication tuning
- general: who (from where)
- general: security
- general: interaction
- password authentication
- public key authentication
- Kerberos options
- GSSAPI options
- host-based authentication
- host-based and r-host-RSA authentication
- granted access
- greeting in interactive sessions
- security
- session
- ciphers
- session key
- re-keying
- general: content
- message authentication code; used in SSHv2 for data integrity protection
- general: environment
- subsystems
- forwarding
- built-in X11 traffic forwarder
- session abort conditions
- lifetime and size of ephemeral version 1 server key
- output
- maintenance
- logging
- match
openssh_server_package_name
-
abstract: the name of the package to install
-
behavior:
-
any string: the package gets installed (or updated, see
latest_instead_of_present
) -
undef
:Package['openssh_server']
ain't managed by this module
-
-
allowed values: a string or
undef
-
default:
undef
onFreeBSD
,'openssh-server'
everywhere else
latest_instead_of_present
-
abstract: whether to ensure
Package['openssh_server']
to belatest
instead of justpresent
-
behavior
-
true
:Package['openssh_server']
becomeslatest
-
false
:Package['openssh_server']
becomespresent
-
-
accepted values:
true
andfalse
-
default value:
false
manage_openssh_server_preseed
-
abstract: whether
File['openssh_server_preseed']
is managed -
behavior:
-
false
:File['openssh_server_preseed']
isn't managed -
true
: a proper preseed (responsefile) gets created atpreseed_path
. The only known preseedable value ispermit_root_login
. The class parameter and it appears in the preseed file.
-
-
allowed values:
true
andfalse
-
default:
true
onDebian
systems,false
everywhere else
preseed_path
-
abstract:
File['openssh_server_preseed']['path']
-
allowed values: a non-empty string
-
default:
'/var/cache/debconf/openssh_server.preseed'
preseed_validate_cmd
-
abstract: how to validate the preseed file
-
note: as far as I've seen
debconf-set-selections(1)
checks for syntax errors only. Specifying a string for a boolean setting doesn't seem to be caught. -
allowed values: any string or
undef
-
default:
'/usr/bin/debconf-set-selections --verbose --checkonly %'
preseed_validate_replace
-
abstract: the character to replace with the path to the temporary new contents file
-
allowed values: any string or
undef
-
default:
'%'
manage_sshd_config
-
abstract: whether this module manages
File['sshd_config']
-
allowed values:
true
andfalse
-
default:
false
sshd_config_path
-
abstract:
File['sshd_config']['path']
-
allowed values: a non-empty string
-
default:
'/etc/ssh/sshd_config'
sshd_config_mode
-
abstract: the file permissions of
File['sshd_config']
-
behavior
-
any string: the specified mode is ensured
-
undef
: the file mode is undefined
-
-
allowed values: any string or
undef
-
default:
'0644'
sshd_config_owner
-
abstract: the file owner of
File['sshd_config']
-
allowed values: any string, a non-negative integer, or
undef
-
default:
'root'
onDebian
andFreeBSD
systems,0
(the integer) everywhere else
sshd_config_group
-
abstract: the group of
File['sshd_config']
-
allowed values: any string, a non-negative integer, or
undef
-
default value:
'root'
onDebian
platforms,'wheel'
onFreeBSD
platforms,0
anywhere else
sshd_config_template
-
abstract:
sshd_config
is rendered bytemplate()
-
acceptable values: a non-empty string
-
see also: the default template uses
sshd_config_preamble
-
default:
'openssh_server/sshd_config.erb'
sshd_config_validate_cmd
-
abstract: a syntax validation command for
sshd_config(5)
-
behavior:
-
any string: the specified command validates the new
sshd_config
-
undef
: no validation performed.sshd(8)
refuses to start with faulty configuration files. However, I experiencedService['sshd']
reports a successful start anyway. Ergo, you definitely wanna validate.
-
-
allowed values: any string, and
undef
-
default value:
'/usr/sbin/sshd -t -f %'
sshd_config_validate_replace
-
abstract: the character replaced in
sshd_config_validate_cmd
with the temporary new content file -
allowed values: any string, and
undef
-
default:
'%'
sshd_ensure
-
abstract:
Service['sshd']['ensure']
-
behavior:
-
undef
: this module doesn't manageService['sshd']
-
'running'
:Service['sshd']['ensure'] = 'running'
-
'stopped'
:Service['sshd']['ensure'] = 'stopped'
-
-
allowed values:
'running'
,'stopped'
andundef
-
default:
'running'
sshd_enable
-
abstract:
Service['sshd']['enable']
-
note: requires
Service['sshd']
to be managed by this module, comparesshd_ensure
-
allowed values:
'manual'
,'mask'
,true
,false
, andundef
-
default:
true
no_start_file_ensure
-
abstract: how to deal with
/etc/ssh/sshd_not_to_be_run
-
behavior
-
'present'
: the file is created. It uses the same mode, owner, group as forsshd_config
File creation happens beforeService['sshd']
. Settingsshd_ensure
to'running'
does not emit an error. See/etc/init.d/ssh
or/lib/systemd/system/ssh.service
for details -
'absent'
: ensure the no-start-file isn't there -
undef
: neither delete ortouch(1)
the no-start-file
-
-
allowed values:
'present'
,'absent'
andundef
-
default value:
'absent'
(unconditionally!)
sshd_config_commentary_track
-
abstract: whether comments and empty lines are filtered from the default
sshd_config
template -
behavior:
-
false
: all lines of the content body starting with a hash are filtered, as well as empty lines -
true
: comments and structuring empty lines remain in place (the default template currently gives an odd look, if not all [or at least most] parameters are used)
-
-
allowed values:
true
andfalse
-
default:
true
sshd_config_preamble
-
abstract: specifies a preamble
template()
forsshd_config
-
behavior
-
any non-empty string: the default template
sshd_config_template
includes the specified template. -
undef
: the default template does not include a preamble
-
-
allowed values: any non-empty string, and
undef
-
default:
openssh_server/sshd_config_preamble.erb
address_family
-
abstract: see
AddressFamily
insshd_config(5)
-
allowed values:
'any'
,'inet'
,'inet6'
, andundef
-
default:
undef
port
-
abstract: see
Port
insshd_config(5)
and-p
insshd(8)
-
allowed values: a non-empty array of integers ∊ [0, 65535], or
undef
-
default:
undef
listen_address
-
abstract: compare
ListenAddress
insshd_config(5)
-
allowed values: a non-empty array of the following structure:
{host => …, port => Optional[…]}
orundef
.host
can be an array of four integers ∊ [0, 255], or an array of eight integers ∊ [0x0000
,0xFFFF
], or a non-empty string of non-blank characters.port
can be an integer ∊ [0, 65535]. -
example:
[{host => [10, 11, 12, 13], port => 65432}]
(do not copy) -
default:
undef
gateway_ports
-
abstract: see
GatewayPorts
insshd_config(5)
-
allowed values:
true
,false
,'clientspecified'
orundef
-
default:
undef
max_startups
-
abstract: see for
MaxStartups
insshd_config(5)
-
allowed values:
-
a non-negative integer
-
a hash of the structure
{start => Integer[0], rate => Integer[0], full => Integer[0]}
-
undef
-
-
default:
undef
protocol
-
abstract: see
Protocol
insshd_config(5)
-
allowed values: a non-empty array of integers ∊ [1, 2], and
undef
-
example:
[2]
-
default:
undef
max_sessions
-
abstract: see
MaxSessions
insshd_config(5)
-
accepted values: any non-negative integer, and
undef
-
default value:
undef
host_key
-
abstract: see
HostKey
insshd_config(5)
and-h
insshd(8)
-
allowed values: a non-empty array of strings, containing no blanks, and not ending on a slash
/
, or, alternatively,undef
-
example:
['/etc/ssh/ssh_host_rsa_key', '/etc/ssh/ssh_host_ecdsa_key']
-
default:
undef
host_certificate
-
abstract: see
HostCertificate
insshd_config(5)
-
allowed values: as for
host_key
-
default:
undef
banner
-
abstract: see
Banner
insshd_config(5)
-
allowed values: a string containing no blanks and not ending on a slash
/
, orundef
-
default:
undef
debian_banner
-
abstract: see
DebianBanner
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default value:
undef
version_addendum
-
abstract: see
VersionAddendum
insshd_config(5)
-
allowed values: a word in the ASCII character set, or
undef
-
default:
undef
host_key_agent
-
abstract: see
HostKeyAgent
insshd_config(5)
-
allowed values: a non-empty string containing no blanks, or
undef
-
default:
undef
password_authentication
-
abstract: see
PasswordAuthentication
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
pubkey_authentication
-
abstract: see
PubkeyAuthentication
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
kerberos_authentication
-
abstract: see
KerberosAuthentication
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
gssapi_authentication
-
abstract: see
GSSAPIAuthentication
insshd_config(5)
-
accepted values:
true
,false
,undef
-
default:
undef
challenge_response_auth
-
abstract: see
ChallengeResponseAuthentication
insshd_config(5)
-
honored values:
true
,false
, andundef
-
default value:
undef
use_pam
-
abstract: see
UsePAM
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
hostbased_authentication
-
abstract: see
HostbasedAuthentication
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
kbd_interactive_auth
-
abstract: see
KbdInteractiveAuthentication
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default value:
undef
rhosts_rsa_authentication
-
abstract: see
RhostsRSAAuthentication
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
rsa_authentication
-
abstract: see
RSAAuthentication
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
authentication_methods
-
abstract: see
AuthenticationMethods
insshd_config(5)
-
allowed values: a non-empty array of non-empty arrays of the following structure:
{method => …, device => Optional[…]}
wheremethod
is a word in the ASCII character set, and optionallydevice
is a word in the ASCII character set. Alternativelyundef
. -
example:
[[{method => 'publickey'}, {method => 'password'}], [{method => 'publickey'}, {method => 'keyboard-interactive'}]]
(do not copy but write off) -
default:
undef
permit_root_login
-
abstract: see
PermitRootLogin
insshd_config(5)
-
allowed values:
true
,false
,'without-password'
,'forced-commands-only'
, andundef
-
default:
undef
deny_users
-
abstract: see
DenyUsers
insshd_config(5)
-
acceptable values: a non-empty array of non-empty strings, without any blanks, or
undef
-
example:
['*']
-
default:
undef
allow_users
-
abstract: compare
AllowUsers
insshd_config(5)
-
allowed values: see
deny_users
-
example:
['ernie', 'bert']
-
default:
undef
deny_groups
-
abstract: see
DenyGroups
insshd_config(5)
-
acceptable values: a non-empty array of non-empty strings, containing no blanks, or just
undef
-
example:
['*']
-
default:
undef
allow_groups
-
abstract: see
AllowGroups
insshd_config(5)
-
allowed values: see
deny_groups
-
example:
['support', 'staff']
-
default:
undef
use_privilege_separation
-
abstract: see
UsePrivilegeSeparation
insshd_config(5)
and compare § “files” insshd(8)
-
allowed values:
true
,false
,'sandbox'
andundef
-
default:
undef
use_dns
-
abstract: see
UseDNS
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
max_auth_tries
-
abstract: see
MaxAuthTries
insshd_config(5)
-
allowed values: some non-negative integer or
undef
-
default:
undef
strict_modes
-
abstract: see
StrictModes
insshd_config(5)
-
allowed values:
true
,false
andundef
-
default:
undef
login_grace_time
-
abstract: see
LoginGraceTime
insshd_config(5)
and-g
insshd(8)
-
accepted values: a non-negative integer, and
undef
-
default:
undef
use_login
-
abstract: see
UseLogin
insshd_config(5)
for more information -
allowed values:
true
,false
orundef
-
default:
undef
permit_empty_passwords
-
abstract: compare
PermitEmptyPasswords
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
pubkey_accepted_key_types
-
abstract: see
PubkeyAcceptedKeyTypes
insshd_config(5)
-
allowed values:
true
,false
andundef
-
default value:
undef
pubkey_accepted_key_types
-
abstract: see
PubkeyAcceptedKeyTypes
insshd_config(8)
-
allowed values: a non-empty array of non-empty strings, containing no blanks or commas, or just
undef
-
example:
['ssh-ed25519*', 'ecdsa*']
-
default value:
undef
trusted_user_ca_keys
-
abstract: see
TrustedUserCAKeys
insshd_config(5)
for more details -
allowed values: a non-empty string of non-blank characters, and not ending on a slash, or
undef
-
default:
undef
authorized_principals_file
-
abstract: see
AuthorizedPrincipalsFile
insshd_config(5)
-
allowed values:
undef
, or an absolute path to a file, or a path starting with'%h'
xor'~'
. Both variants must not contain any blanks. Both variants must not end on a slash. -
defaults to:
undef
authorized_principals_cmd
-
abstract: see
AuthorizedPrincipalsCommand
insshd_config(5)
-
allowed values:
undef
or a string starting with a slash (not containing any blanks) and optionally followed by a space and then containing anything but newlines. -
example:
'/usr/local/sbin/sshdapc %u'
-
default:
undef
authorized_principals_cmd_uid
-
abstract: see
AuthorizedPrincipalsCommandUser
insshd_config(5)
-
allowed values: a non-empty string containing no blanks, or
undef
-
example:
'lu'
(local user [the default user I create at my site]) -
default:
undef
kerberos_get_afs_token
-
abstract: see
KerberosGetAFSToken
insshd_config(5)
for details -
allowed values:
true
,false
, andundef
-
default value:
undef
kerberos_or_local_passwd
-
abstract: search for
KerberosOrLocalPasswd
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default value:
undef
kerberos_ticket_cleanup
-
abstract: see
KerberosTicketCleanup
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
gssapi_key_exchange
-
abstract: see
GSSAPIKeyExchange
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
gssapi_strict_acceptor_check
-
abstract: see
GSSAPIStrictAcceptorCheck
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
gssapi_store_creds_on_rekey
-
abstract: see
GSSAPIStoreCredentialsOnRekey
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
gssapi_cleanup_credentials
-
abstract: compare
GSSAPICleanupCredentials
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
hostbased_accepted_key_types
-
abstract: see
HostbasedAcceptedKeyTypes
insshd_config(5)
-
allowed values:
undef
or a non-empty array of non-empty strings containing no blanks or commas -
default:
undef
hostbased_uses_name_fr_packet
-
abstract: see
HostbasedUsesNameFromPacketOnly
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default value:
undef
ignore_rhosts
-
abstract: see
IgnoreRhosts
insshd_config(5)
for on that -
allowed values:
true
,false
, andundef
-
default:
undef
ignore_user_known_hosts
-
abstract: see
IgnoreUserKnownHosts
insshd_config(5)
-
allowed values:
undef
,false
, andtrue
-
default:
undef
print_motd
-
abstract: see
PrintMotd
insshd_config(5)
and §§ “login process” and “files” insshd(8)
-
allowed values:
true
,false
, andundef
-
default:
undef
print_last_log
-
abstract: compare
PrintLastLog
insshd_config(5)
and § “login process” insshd(8)
-
allowed values: uhm,
true
, and, uhm,false
…undef
, too -
default:
undef
chroot_directory
-
abstract: see
ChrootDirectory
insshd_config(5)
-
accepted values:
undef
, or a non-empty string containing no blanks and ending on a slash/
-
example:
'/opt/mailbox_read_env/'
-
default:
undef
ciphers
-
abstract: see
Ciphers
insshd_config(5)
-
allowed values:
undef
or a non-empty array of strings whatssh -Q cipher
in my version of openssh listed -
example:
['aes256-ctr', 'aes192-ctr', 'aes128-ctr', 'arcfour256', 'arcfour128', 'arcfour']
-
default:
undef
kex_algorithms
-
abstract: see
KexAlgorithms
insshd_config(5)
-
allowed values:
undef
or a non-empty array of string whichssh -Q kex
of my openssh version listed -
example:
['ecdh-sha2-nistp521', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp256', 'curve25519-sha256@libssh.org']
-
default:
undef
rekey_limit
-
abstract: see
RekeyLimit
insshd_config(5)
-
accepted values:
undef
or a hash of the following structure:{maximum_transmitted_bytes => …, maximum_seconds_elapsed => Optional[…]}
wheremaximum_transmitted_bytes
is either a non-negative integer, or the string'default'
. The optionalmaximum_seconds_elapsed
can be a non-negative integer, or the string'none'
. -
example:
{maximum_transmitted_bytes => 'default', maximum_seconds_elapsed => 3593}
(do not copy but write off) -
default:
undef
ipqos
-
abstract: confer
IPQoS
insshd_config(5)
-
allowed values:
undef
or a hash of the following structure:{interactive_sessions => …, non_interactive_sessions => …}
Bothinteractive_sessions
andnon_interactive_sessions
have to be either an integer ∊ [0, 255], or of the named QoS in the man page as a string. -
example:
{interactive_sessions => 'lowdelay', non_interactive_sessions => 'throughput'}
-
default:
undef
compression
-
abstract: look up
Compression
insshd_config(5)
-
allowed values:
true
,false
,'delayed'
, andundef
-
default:
undef
macs
-
abstract: read
MACs
insshd_config(5)
-
allowed values:
undef
or a non-empty array of strings, what my openssh version returned onssh -Q mac
-
default:
undef
force_command
-
abstract: see
ForceCommand
insshd_config(5)
-
allowed values:
undef
or a non-empty string containing no newlines -
default:
undef
accept_env
-
abstract: compare
AcceptEnv
insshd_config(5)
-
allowed values:
undef
or a non-empty array of non-empty strings containing no blanks -
example:
['LANG', 'LC_*']
-
default:
undef
permit_user_environment
-
abstract: see
PermitUserEnvironment
insshd_config(5)
-
accepted values:
true
,false
, andundef
-
default:
undef
permit_tty
-
abstract: see
PermitTTY
insshd_config(5)
-
allowed values:
true
,false
andundef
-
default:
undef
subsystem
-
abstract: see
Subsystem
insshd_config(5)
-
allowed values:
undef
or a non-empty array of hashes having the following structure:{name => …, command => …, arguments => Optional[…]}
wherename
has to be a word out of the ASCII character set.command
has to be string starting with a slash/
, containing no blanks, and must not end on a slash.arguments
is an optional non-empty array of non-empty strings containing no blanks -
example:
{name => 'sftp', command => '/usr/lib/openssh/sftp-server'}
(do not copy but write off) -
default:
undef
permit_tunnel
-
abstract: see
PermitTunnel
insshd_config(5)
-
allowed values:
true
,false
,'point-to-point'
,'ethernet'
, andundef
-
default:
undef
allow_agent_forwarding
-
abstract: see
AllowAgentForwarding
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default value:
undef
allow_tcp_forwarding
-
abstract: see
AllowTcpForwarding
insshd_config(5)
-
allowed values:
true
,false
,'all'
,'local'
,'remote'
, andundef
-
default:
undef
permit_open
-
abstract: see
PermitOpen
insshd_config(5)
-
allowed values:
-
undef
-
'any'
, -
'none'
-
a non-empty array of hashes with the following structure:
{host => …, port => …}
wherehost
is either an array of four integers ∊ [0, 255], or an array of eight integers ∊ [0x0000
,0xFFFF
], or non-empty string, containing neither strings or colons:
.port
has to be an integer ∊ [0, 65535].
-
-
default:
undef
allow_stream_local_forwarding
-
abstract: see
AllowStreamLocalForwarding
insshd_config(5)
-
allowed values:
true
,false
,'all'
,'local'
,'remote'
, orundef
-
default:
undef
stream_local_bind_mask
-
abstract: see
StreamLocalBindMask
insshd_config(5)
-
allowed values:
undef
or a string of four octal digits -
default:
undef
stream_local_bind_unlink
-
abstract: see
StreamLocalBindUnlink
insshd_config(5)
-
allowed values:
true
,false
,undef
-
default:
undef
x11_forwarding
-
abstract: see
X11Forwarding
insshd_config(5)
-
acceptable value:
true
,false
, andundef
-
default:
undef
x_auth_location
-
abstract: see
XAuthLocation
insshd_config(5)
-
allowed values:
undef
, or'none'
, or a string starting with a slash/
, but not ending on a slash, and containing no blanks -
default:
undef
x11_use_localhost
-
abstract: see
X11UseLocalhost
insshd_config(5)
-
honored values:
true
,false
, andundef
-
default:
undef
x11_display_offset
-
abstract: see
X11DisplayOffset
insshd_config(5)
-
allowed values:
undef
or a non-negative integer -
default:
undef
tcp_keep_alive
-
abstract: see
TCPKeepAlive
insshd_config(5)
-
allowed values:
true
,false
, andundef
-
default:
undef
client_alive_interval
-
abstract: see
ClientAliveInterval
insshd_config(5)
-
allowed values:
undef
or a non-negative integer -
default:
undef
client_alive_count_max
-
abstract: see
ClientAliveCountMax
insshd_config(5)
for details -
allowed values:
undef
or a non-negative integer -
default:
undef
key_regeneration_interval
-
abstract: compare
KeyRegenerationInterval
insshd_config(5)
and-k
insshd(8)
-
allowed values:
undef
or a non-negative integer -
default:
undef
server_key_bits
-
abstract: compare
ServerKeyBits
insshd_config(5)
and-b
insshd(8)
-
allowed values:
undef
or an integer ∊ [512, ∞), -
default:
undef
pid_file
-
abstract: see
PidFile
insshd_config(5)
-
note: the init.d scripts hold plain text defaults. Changing this value might break
Service['sshd']
as defined inopenssh_server::service
. You'd like to setsshd_ensure
=> undef
, too, and perform service management on your own (e.g. viasystemd
isease unit files) -
allowed values: an absolute path string to a file (not ending with a slash, and not containing any blanks), or
'none'
orundef
-
default:
undef
syslog_facility
-
abstract: see
SyslogFacility
insshd_config(5)
-
allowed values:
'DAEMON'
,'USER'
,'AUTH'
,'LOCAL0'
,'LOCAL1'
,'LOCAL2'
,'LOCAL3'
,'LOCAL4'
,'LOCAL5'
,'LOCAL6'
,'LOCAL7'
, andundef
-
default value:
undef
log_level
-
abstract: see
LogLevel
insshd_config(5)
-
behavior: According to
sshd_config(5)
the default logging level is'INFO'
. According tosshd(8)
(see-q
) beginning, authentication and termination of each connection is logged. -
acceptable values:
'QUIET'
,'FATAL'
,'ERROR'
,'VERBOSE'
'DEBUG'
,'DEBUG1'
,'DEBUG2'
,'DEBUG3'
,'INFO'
andundef
-
default:
undef
fingerprint_hash
-
abstract: see
FingerprintHash
insshd_config(5)
-
acceptable values:
'md5'
,'sha256'
andundef
-
default:
undef
match
-
abstract: apply settings to specific sort of connections only
-
acceptable values:
undef
, or a non-empty array of `openssh_server::match -
default:
undef
types
openssh_server::match
This resource type does nothing. It just exists to create a scope for variables.
All attributes but policy
describe a condition
an associated openssh_server::policy
apply to.
If you do not specify any condition attributes,
Match All
is implied.
user
-
abstract: restrict matches to user names
-
allowed values:
undef
, or a non-empty array of non-empty strings containing no blanks or commas -
example:
['service_user', 'puppet']
-
default:
undef
group
-
abstract: restrict matches to users' groups
-
allowed values:
undef
, or a non-empty array of non-empty strings containing no blanks nor commas -
example:
['wheel']
-
default:
undef
host
-
abstract: restrict matches to host names
-
allowed values:
undef
, or a non-empty array of non-empty strings containing no blanks nor commas -
example:
['*.int.acme.tld']
-
default:
undef
local_address
-
abstract: restrict matches to their local address
-
This condition especially makes sense, if your
sshd
listens on multipleListenAddress
es -
allowed values:
undef
, or non-empty array of arrays. The inner arrays can be either arrays of four integers ranging zero to 255, or arrays of eight integers rangin zero to0xFFFF
-
example:
[[10,4,8,3]]
-
default:
undef
local_port
-
abstract: restrict matches to incoming ports
-
this condition especially makes sense, if your
sshd(8)
listens on multiplePort
s -
allowed values:
undef
, or a non-empty array of non-negative integers up to and include65535
-
example:
[31415, 62832]
-
default:
undef
address
-
abstract: restrict matches to connections originating from specific address
-
allowed values:
undef
, or a non-empty array of structures. Structures may either have the keysipv4_address_octets
andcidr_mask
, oripv6_address_words
andcidr_mask
. In case they haveipv4_address_octets
,cidr_mask
may be a non-negative integer up to and including32
. In case they haveipv6_address_words
,cidr_mask
may be a non-negative integer up to and including128
.ipv4_address_octets
has to be an array of four integers ranging from zero to255
.ipv6_address_words
has to be an array of eigh integers ranging from zero to0xFFFF
. -
example:
[{ipv4_address_octets => [10,0,0,0], cidr_mask => 8}]
-
default:
undef
policy
-
abstract: the policy associated with matched connections
-
required value: a reference to a
openssh_server::policy
resource -
example:
Openssh_server::Policy['weak_security']
-
default:
undef
openssh_server::policy
This resource type does nothing. It just exists to create a scope for variables.
It accepts a limited set of class parameters, which have the same type:
gateway_ports
max_sessions
banner
password_authentication
pubkey_authentication
kerberos_authentication
gssapi_authentication
hostbased_authentication
kbd_interactive_auth
rhosts_rsa_authentication
rsa_authentication
authentication_methods
permit_root_login
deny_users
allow_users
deny_groups
allow_groups
max_auth_tries
permit_empty_passwords
pubkey_accepted_key_types
trusted_user_ca_keys
authorized_principals_file
revoked_keys
authorized_keys_file
limitations
-
Only one openssh-server instance can be managed. Since there are several ways to run multiple
sshd
s on a single host, this module won't be enhanced into this direction. You'd probably want it realized somehow differently anyway. -
This module does not provide a way to uninstall
openssh-server
. -
As a limitation of what can be modeled with the PP language a
sshd_config
-change always triggers a restart. Though you can explicitely specify arestart
command e.g./etc/init.d/ssh reload
, that's definitely not best practice. (compare PUP-1054) -
During development I experienced
Service['sshd']
(the PP resource) does not fail if it's got a faultysshd_config
.sshd_config_validate_cmd
should catch this case now. -
This module does not manage
sshd_enable
,sshd_program
, orsshd_flags
onFreeBSD
platforms. -
This module does not manage an sshd-specific PAM (pluggable authentication module) stack.
-
If you suffer from
systemd
isease, specifying alisten_address
possibly results in a not-startingsshd(8)
during boot-time:systemd
tries to start thessh
service, though not all network interfaces are configured yet. The OpenSSH-server refuses to start, if there's no interface having the specifiedlisten_address
. Thesystemd
guys virtually say, they're doing everything right, what's causing such situations are buggy implementation – OpenSSH allegedly has a buggy implementation (regarding networking).
development
- drop me a line,
if you'd like to improve this module:
Kai Burghardt <wiz:KaiBurghardt.de>
to do:
- tweak the template so in commentary mode it prints only comments/separating newlines where necessary
- YARD
- appoint ppl who care about support of their favorite OS
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.