openssh: openssh main class (internal variables initialization)openssh::config: Setup SSHD daemon configurationopenssh::keys: Set up authorized_keys file for root accountopenssh::package: Manage OpenSSH daemon and client packagesopenssh::params: openssh module parametersopenssh::service: Manage SSHd daemon serviceopenssh::ssh_keygen: A short summary of the purpose of this class
openssh::auth_key: A short summary of the purpose of this defined type.openssh::priv_key: Set SSH private key for user.openssh::ssh_config: A short summary of the purpose of this defined type.
Openssh class for variables initialization
include opensshThe following parameters are available in the openssh class.
Data type: String
Data type: String
Data type: String
Data type: String
Data type: String
Data type: Optional[String]
Data type: String
Data type: Boolean
Data type: Boolean
Data type: String
Data type: Optional[String]
Data type: String
Data type: Optional[String]
Data type: String
Data type: String
Data type: Array[String]
Data type: Boolean
Data type: Integer
Default value: $openssh::params::ssh_port
Data type: String
Default value: $openssh::params::config
Data type: String
Default value: $openssh::params::base_package_name
Data type: Optional[String]
Default value: $openssh::params::server_package_name
Data type: Optional[String]
Default value: $openssh::params::client_package_name
Data type: Optional[ Array[String] ]
Default value: $openssh::params::openssh_server_dependencies
Setup SSHD daemon configuration based on template
include openssh::configThe following parameters are available in the openssh::config class.
Data type: Stdlib::Unixpath
Default value: $openssh::config
Data type: Stdlib::Port
Default value: $openssh::ssh_port
Data type: String
Default value: $openssh::config_template
Data type: Variant[ Enum['none'], Stdlib::Unixpath ]
Default value: $openssh::banner
Data type: Optional[String]
Default value: $openssh::keys_file
Data type: Enum['yes', 'no', 'all', 'local', 'remote']
Default value: $openssh::allow_tcp_forwarding
Data type: Enum['yes', 'no', 'without-password', 'prohibit-password', 'forced-commands-only']
Default value: $openssh::permit_root_login
Data type: Enum['yes', 'no']
Default value: $openssh::strict_modes
Data type: Enum['yes', 'no']
Default value: $openssh::gss_api_authentication
Data type: Boolean
Default value: $openssh::setup_host_key
Set up authorized_keys file for root account
include openssh::keysThe following parameters are available in the openssh::keys class.
Data type: String
The user account in which the SSH key should be installed. The resource will autorequire this user if it is being managed as a user resource.
Default value: $openssh::sshkey_user
Data type: Optional[ Array[ Struct[{ type => String, key => String, name => String, }] ] ]
If provided - it is exact list of SSH public keys to be added into user root account All other settings will be ignored except sshkey_dir
Default value: undef
Data type: Optional[Stdlib::Base64]
The public key itself; generally a long string of hex characters. The key attribute may not contain whitespace.
Make sure to omit the following in this attribute (and specify them in other attributes):
- Key headers, such as ‘ssh-rsa’ — put these in the type attribute.
- Key identifiers / comments, such as ‘joe@joescomputer.local’ — put these in the name attribute/resource title.
Default value: undef
Data type: Optional[String]
The SSH key comment. This can be anything, and doesn’t need to match the original comment from the .pub file.
Due to internal limitations, this must be unique across all user accounts; if you want to specify one key for multiple users, you must use a different comment for each instance.
Default value: $openssh::sshkey_name
Data type: Openssh::KeyType
The encryption type used. Allowed values: ssh-dss ssh-rsa ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 ssh-ed25519 dsa ed25519 rsa
Default value: $openssh::sshkey_type
Data type: Stdlib::Unixpath
The absolute filename in which to store the SSH key. This property is optional and should be used only in cases where keys are stored in a non- standard location, for instance when not in ~user/.ssh/authorized_keys
Default value: $openssh::sshkey_target
Data type: Array[String]
Key options; see sshd(8) for possible values. Multiple values should be specified as an array.
Default value: $openssh::sshkey_options
Data type: Enum['present', 'absent']
Default value: present
Data type: Boolean
Default value: false
Data type: Optional[String]
Default value: $openssh::sshkey_group
Data type: Stdlib::Unixpath
Default value: $openssh::sshkey_dir
Manage OpenSSH daemon and client packages
include openssh::packageThe following parameters are available in the openssh::package class.
Data type: String
Default value: present
Data type: String
Default value: present
Data type: String
Default value: present
Data type: String
Default value: $openssh::base_package_name
Data type: Boolean
Default value: $openssh::manage_client_package
Data type: Optional[String]
Default value: $openssh::client_package_name
Data type: Boolean
Default value: $openssh::manage_server_package
Data type: Optional[String]
Default value: $openssh::server_package_name
Data type: Optional[ Array[String] ]
Default value: $openssh::openssh_server_dependencies
Openssh module parameters
include openssh::paramsManage SSHd daemon service
include openssh::serviceThe following parameters are available in the openssh::service class.
Data type: Boolean
Default value: true
Data type: String
Default value: running
Data type: String
Default value: $openssh::params::service_name
Generate new OpenSSH private key or export root public key
include openssh::ssh_keygenThe following parameters are available in the openssh::ssh_keygen class.
Data type: String
Default value: $openssh::sshkey_name
Data type: String
Default value: $openssh::sshkey_user
Data type: Openssh::KeyType
Default value: $openssh::sshkey_type
Data type: Stdlib::Unixpath
Default value: $openssh::sshkey_target
Data type: Stdlib::Unixpath
Default value: $openssh::sshkey_dir
Data type: Array[String]
Default value: $openssh::sshkey_options
Data type: String
Default value: present
Data type: Integer
Default value: 2048
Data type: Boolean
Default value: true
Data type: Boolean
Default value: false
A description of what this defined type does
openssh::auth_key { 'namevar': }The following parameters are available in the openssh::auth_key defined type.
Data type: String
The user account in which the SSH key should be installed
Data type: Enum['present', 'absent']
Default value: present
Data type: Openssh::KeyType
Default value: 'ssh-rsa'
Data type: Optional[String]
The The SSH key name/comment. In their native habitat, SSH keys usually
appear as a single long line, in the format: <TYPE> <KEY> <NAME/COMMENT>
Default value: undef
Data type: Optional[Stdlib::Unixpath]
Default value: undef
Data type: Optional[Array[String]]
Default value: undef
Data type: Optional[Stdlib::Base64]
Default value: undef
Data type: Boolean
Boolean flag. If set to true openssh::auth_key resource will export ssh
host key via resource Sshkey with title equal to
<fqdn>_<sshkey_user>_known_host
where <fqdn> is puppet fact $::fqdn and <sshkey_user> is sshkey_user
parameter.
The Sshkey resource's target parameter will be set to
~/.ssh/known_hosts path for user sshkey_user (with home directory
/root for user root and /home/<sshkey_user> for all other users)
Default value: true
Data type: Boolean
Boolean flag. If set to true openssh::auth_key resource will import
Ssh_authorized_key resource with title equal:
- to either parameter
sshkey_nameor - to name combined from parameter
sshkey_userand fact$::hostnameas string<sshkey_user>@<hostname>
Default value: false
Set SSH private key for user.
openssh::priv_key { 'namevar': }The following parameters are available in the openssh::priv_key defined type.
Data type: String
The name of system user for which private key should be set Used for SSH directory compilation (either /root/.ssh if user is 'root' or /home/user_name/.ssh) Used as ownership group if user_group is not specified Used for SSH public key comment during public key generating
Data type: String
SSH private key content
Data type: Optional[String]
SSH public key comment (will be set if specified)
Default value: $name
Data type: Enum['PEM', 'RFC4716', 'PKCS8']
Default is 'PEM' The supported key formats are: "RFC4716" (RFC 4716/SSH2 public or private key), "PKCS8" (PEM PKCS8 public key) or "PEM" (PEM public key). The default conversion format for ssh-keygen tool is "RFC4716"
Default value: 'PEM'
Data type: Openssh::KeyType
Default is 'rsa' SSH private key type (eg rsa or dsa) Used for SSH private and public key file name compilation (eg .ssh/id_<key_id> where key_id is the type of key: dsa | ecdsa | ed25519 | rsa)
Default value: 'ssh-rsa'
Data type: Optional[String]
Private key ownership group
Default value: undef
Data type: Optional[Stdlib::Unixpath]
SSH directory which used for SSH keys storage instead of standard one compiled based on user_name
Default value: undef
Data type: Boolean
if set - public key will be generated with suffix .pub based on private key
Default value: false
Data type: Optional[Pattern[/^[-a-z0-9]+$/]]
if set - used for private and public file name compilation as prefix (eg git.id_rsa where key_prefix is git)
Default value: undef
A description of what this defined type does
openssh::ssh_config { 'namevar': }The following parameters are available in the openssh::ssh_config defined type.
Data type: Array[Openssh::SshConfig]
Data type: String
Default value: $name
Data type: Optional[String]
Default value: undef
Data type: Boolean
Default value: false
Data type: Optional[Stdlib::Unixpath]
Default value: undef
The Openssh::ClientOption data type.
Alias of Enum['AddressFamily', 'BatchMode', 'BindAddress', 'ChallengeResponseAuthentication', 'CheckHostIP', 'Cipher', 'Ciphers', 'ClearAllForwardings', 'Compression', 'CompressionLevel', 'ConnectionAttempts', 'ConnectTimeout', 'ControlMaster', 'ControlPath', 'ControlPersist', 'DynamicForward', 'EnableSSHKeysign', 'EscapeChar', 'ExitOnForwardFailure', 'ForwardAgent', 'ForwardX11', 'ForwardX11Trusted', 'GatewayPorts', 'GlobalKnownHostsFile', 'GSSAPIAuthentication', 'GSSAPIKeyExchange', 'GSSAPIClientIdentity', 'GSSAPIDelegateCredentials', 'GSSAPIRenewalForcesRekey', 'GSSAPITrustDns', 'GSSAPIKexAlgorithms', 'Host', 'HashKnownHosts', 'HostbasedAuthentication', 'HostKeyAlgorithms', 'HostKeyAlias', 'HostName', 'IdentitiesOnly', 'IdentityFile', 'KbdInteractiveAuthentication', 'KbdInteractiveDevices', 'KexAlgorithms', 'LocalCommand', 'LocalForward', 'LogLevel', 'MACs', 'NoHostAuthenticationForLocalhost', 'NumberOfPasswordPrompts', 'PasswordAuthentication', 'PermitLocalCommand', 'PKCS11Provider', 'Port', 'PreferredAuthentications', 'Protocol', 'ProxyCommand', 'PubkeyAuthentication', 'RekeyLimit', 'RemoteForward', 'RhostsRSAAuthentication', 'RSAAuthentication', 'SendEnv', 'ServerAliveCountMax', 'ServerAliveInterval', 'StrictHostKeyChecking', 'TCPKeepAlive', 'Tunnel', 'TunnelDevice', 'UsePrivilegedPort', 'User', 'UserKnownHostsFile', 'VerifyHostKeyDNS', 'VisualHostKey', 'XAuthLocation']
The Openssh::KeyType data type.
Alias of Enum['ssh-dss', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'ssh-ed25519', 'dsa', 'ed25519', 'rsa']
The Openssh::SshConfig data type.
Alias of Hash[Openssh::ClientOption, Variant[ String, Integer, Array[String, 1], ]]