2017-04-24 12:22:51 +00:00
# true if IPv6 is needed
2021-02-18 15:40:18 +00:00
network_ipv6_enable : false # sshd + ssh
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# true if sshd should be started and enabled
2021-02-18 15:40:18 +00:00
ssh_server_enabled : true # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# true if DNS resolutions are needed, look up the remote host name, defaults to false from 6.8, see: http://www.openssh.com/txt/release-6.8
2021-02-18 15:40:18 +00:00
ssh_use_dns : false # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# true or value if compression is needed
2021-02-18 15:40:18 +00:00
ssh_client_compression : false # ssh
ssh_compression : false # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# For which components (client and server) to generate the configuration for. Can be useful when running against a client without an SSH server.
ssh_client_hardening : true # ssh
ssh_server_hardening : true # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# If true, password login is allowed
2021-02-18 15:40:18 +00:00
ssh_client_password_login : false # ssh
ssh_server_password_login : false # sshd
2017-04-24 12:22:51 +00:00
# ports on which ssh-server should listen
2021-02-18 15:40:18 +00:00
ssh_server_ports : [ '22' ] # sshd
2017-04-24 12:22:51 +00:00
# port to which ssh-client should connect
2021-02-18 15:40:18 +00:00
ssh_client_port : '22' # ssh
2017-04-24 12:22:51 +00:00
# one or more ip addresses, to which ssh-server should listen to. Default is empty, but should be configured for security reasons!
2021-02-18 15:40:18 +00:00
ssh_listen_to : [ '0.0.0.0' ] # sshd
2017-04-24 12:22:51 +00:00
# Host keys to look for when starting sshd.
2021-02-18 15:40:18 +00:00
ssh_host_key_files : [ ] # sshd
2017-04-24 12:22:51 +00:00
2020-05-15 20:41:39 +00:00
# Specifies the host key algorithms that the server offers
2021-02-18 15:40:18 +00:00
ssh_host_key_algorithms : [ ] # sshd
# specifies the time allowed for successful authentication to the SSH server
ssh_login_grace_time : 30s
2020-05-15 20:41:39 +00:00
2017-04-24 12:22:51 +00:00
# Specifies the maximum number of authentication attempts permitted per connection. Once the number of failures reaches half this value, additional failures are logged.
ssh_max_auth_retries : 2
2021-02-18 15:40:18 +00:00
# Specifies the maximum number of open sessions permitted from a given connection
ssh_max_sessions : 10
ssh_client_alive_interval : 300 # sshd
ssh_client_alive_count : 3 # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# Allow SSH Tunnels
ssh_permit_tunnel : false
2021-02-18 15:40:18 +00:00
# Hosts with custom options. # ssh
2017-04-24 12:22:51 +00:00
# Example:
# ssh_remote_hosts:
# - names: ['example.com', 'example2.com']
# options: ['Port 2222', 'ForwardAgent yes']
# - names: ['example3.com']
# options: ['StrictHostKeyChecking no']
ssh_remote_hosts : [ ]
2020-05-15 20:41:39 +00:00
# Set this to "without-password" or "yes" to allow root to login
2021-02-18 15:40:18 +00:00
ssh_permit_root_login : 'no' # sshd
2017-04-24 12:22:51 +00:00
# false to disable TCP Forwarding. Set to true to allow TCP Forwarding.
2021-02-18 15:40:18 +00:00
ssh_allow_tcp_forwarding : 'no' # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# false to disable binding forwarded ports to non-loopback addresses. Set to true to force binding on wildcard address.
# Set to 'clientspecified' to allow the client to specify which address to bind to.
2021-02-18 15:40:18 +00:00
ssh_gateway_ports : false # sshd
2018-12-17 12:50:15 +00:00
2017-04-24 12:22:51 +00:00
# false to disable Agent Forwarding. Set to true to allow Agent Forwarding.
2021-02-18 15:40:18 +00:00
ssh_allow_agent_forwarding : false # sshd
# false to disable X11 Forwarding. Set to true to allow X11 Forwarding.
ssh_x11_forwarding : false # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# true if SSH has PAM support
ssh_pam_support : true
2017-04-24 12:22:51 +00:00
# false to disable pam authentication.
2021-02-18 15:40:18 +00:00
ssh_use_pam : true # sshd
2018-12-17 12:50:15 +00:00
2020-05-15 20:41:39 +00:00
# specify AuthenticationMethods
sshd_authenticationmethods : 'publickey'
2018-12-17 12:50:15 +00:00
# true if SSH support GSSAPI
2020-05-15 20:41:39 +00:00
ssh_gssapi_support : false
2018-12-17 12:50:15 +00:00
# true if SSH support Kerberos
ssh_kerberos_support : true
2017-04-24 12:22:51 +00:00
# if specified, login is disallowed for user names that match one of the patterns.
2021-02-18 15:40:18 +00:00
ssh_deny_users : '' # sshd
2017-04-24 12:22:51 +00:00
# if specified, login is allowed only for user names that match one of the patterns.
2021-02-18 15:40:18 +00:00
ssh_allow_users : '' # sshd
2017-04-24 12:22:51 +00:00
# if specified, login is disallowed for users whose primary group or supplementary group list matches one of the patterns.
2021-02-18 15:40:18 +00:00
ssh_deny_groups : '' # sshd
2017-04-24 12:22:51 +00:00
# if specified, login is allowed only for users whose primary group or supplementary group list matches one of the patterns.
2021-02-18 15:40:18 +00:00
ssh_allow_groups : '' # sshd
2017-04-24 12:22:51 +00:00
2018-12-17 12:50:15 +00:00
# change default file that contains the public keys that can be used for user authentication.
2021-02-18 15:40:18 +00:00
ssh_authorized_keys_file : '' # sshd
2018-12-17 12:50:15 +00:00
# specifies the file containing trusted certificate authorities public keys used to sign user certificates.
2021-02-18 15:40:18 +00:00
ssh_trusted_user_ca_keys_file : '' # sshd
2018-12-17 12:50:15 +00:00
# set the trusted certificate authorities public keys used to sign user certificates.
# Example:
# ssh_trusted_user_ca_keys:
# - 'ssh-rsa ... comment1'
# - 'ssh-rsa ... comment2'
2021-02-18 15:40:18 +00:00
ssh_trusted_user_ca_keys : [ ] # sshd
2018-12-17 12:50:15 +00:00
# specifies the file containing principals that are allowed. Only used if ssh_trusted_user_ca_keys_file is set.
# Example:
# ssh_authorized_principals_file: '/etc/ssh/auth_principals/%u'
#
# %h is replaced by the home directory of the user being authenticated, and %u is
# replaced by the username of that user. After expansion, the path is taken to be
# an absolute path or one relative to the user's home directory.
#
2021-02-18 15:40:18 +00:00
ssh_authorized_principals_file : '' # sshd
2018-12-17 12:50:15 +00:00
# list of hashes containing file paths and authorized principals. Only used if ssh_authorized_principals_file is set.
# Example:
# ssh_authorized_principals:
# - { path: '/etc/ssh/auth_principals/root', principals: [ 'root' ], owner: "{{ ssh_owner }}", group: "{{ ssh_group }}", directoryowner: "{{ ssh_owner }}", directorygroup: "{{ ssh_group}}" }
# - { path: '/etc/ssh/auth_principals/myuser', principals: [ 'masteradmin', 'webserver' ] }
2021-02-18 15:40:18 +00:00
ssh_authorized_principals : [ ] # sshd
2018-12-17 12:50:15 +00:00
2017-04-24 12:22:51 +00:00
# false to disable printing of the MOTD
2021-02-18 15:40:18 +00:00
ssh_print_motd : false # sshd
ssh_print_pam_motd : false # sshd
2017-04-24 12:22:51 +00:00
# false to disable display of last login information
2021-02-18 15:40:18 +00:00
ssh_print_last_log : false # sshd
2017-04-24 12:22:51 +00:00
2021-02-18 15:40:18 +00:00
# false to disable serving ssh warning banner before authentication is allowed
ssh_banner : false # sshd
# path to file with ssh warning banner
ssh_banner_path : '/etc/ssh/banner.txt'
2017-04-24 12:22:51 +00:00
# false to disable distribution version leakage during initial protocol handshake
2021-02-18 15:40:18 +00:00
ssh_print_debian_banner : false # sshd (Debian OS family only)
2017-04-24 12:22:51 +00:00
# true to enable sftp configuration
sftp_enabled : false
2018-12-17 12:50:15 +00:00
# false to disable sftp chroot
sftp_chroot : true
2020-05-15 20:41:39 +00:00
# sftp default umask
2021-02-18 15:40:18 +00:00
sftp_umask : '0027'
2020-05-15 20:41:39 +00:00
2017-04-24 12:22:51 +00:00
# change default sftp chroot location
sftp_chroot_dir : /home/%u
# enable experimental client roaming
ssh_client_roaming : false
2021-02-18 15:40:18 +00:00
# list of hashes (containing user and rules) to generate Match User blocks for
ssh_server_match_user : false # sshd
# list of hashes (containing group and rules) to generate Match Group blocks for
ssh_server_match_group : false # sshd
2018-12-17 12:50:15 +00:00
2021-02-18 15:40:18 +00:00
# list of hashes (containing addresses/subnets and rules) to generate Match Address blocks for
ssh_server_match_address : false # sshd
2018-12-17 12:50:15 +00:00
2021-02-18 15:40:18 +00:00
# list of hashes (containing port and rules) to generate Match LocalPort blocks for
ssh_server_match_local_port : false # sshd
2020-05-15 20:41:39 +00:00
ssh_server_permit_environment_vars : 'no'
2021-02-18 15:40:18 +00:00
ssh_server_accept_env_vars : ''
2018-12-17 12:50:15 +00:00
# maximum number of concurrent unauthenticated connections to the SSH daemon
2021-02-18 15:40:18 +00:00
ssh_max_startups : '10:30:100' # sshd
2017-04-24 12:22:51 +00:00
ssh_ps53 : 'yes'
ssh_ps59 : 'sandbox'
2018-12-17 12:50:15 +00:00
ssh_macs : [ ]
ssh_ciphers : [ ]
ssh_kex : [ ]
2017-04-24 12:22:51 +00:00
ssh_macs_53_default :
- hmac-ripemd160
- hmac-sha1
2020-05-15 20:41:39 +00:00
ssh_macs_53_el_6_5_default :
- hmac-sha2-512
- hmac-sha2-256
2017-04-24 12:22:51 +00:00
ssh_macs_59_default :
- hmac-sha2-512
- hmac-sha2-256
- hmac-ripemd160
ssh_macs_66_default :
- hmac-sha2-512-etm@openssh.com
- hmac-sha2-256-etm@openssh.com
- umac-128-etm@openssh.com
- hmac-sha2-512
- hmac-sha2-256
2018-12-17 12:50:15 +00:00
ssh_macs_76_default :
- hmac-sha2-512-etm@openssh.com
- hmac-sha2-256-etm@openssh.com
- umac-128-etm@openssh.com
- hmac-sha2-512
- hmac-sha2-256
2017-04-24 12:22:51 +00:00
ssh_ciphers_53_default :
- aes256-ctr
- aes192-ctr
- aes128-ctr
ssh_ciphers_66_default :
- chacha20-poly1305@openssh.com
- aes256-gcm@openssh.com
- aes128-gcm@openssh.com
- aes256-ctr
- aes192-ctr
- aes128-ctr
ssh_kex_59_default :
- diffie-hellman-group-exchange-sha256
ssh_kex_66_default :
- curve25519-sha256@libssh.org
- diffie-hellman-group-exchange-sha256
2020-05-15 20:41:39 +00:00
ssh_kex_80_default :
- sntrup4591761x25519-sha512@tinyssh.org
- curve25519-sha256@libssh.org
- diffie-hellman-group-exchange-sha256
2017-04-24 12:22:51 +00:00
# directory where to store ssh_password policy
ssh_custom_selinux_dir : '/etc/selinux/local-policies'
2018-12-17 12:50:15 +00:00
sshd_moduli_file : '/etc/ssh/moduli'
2017-04-24 12:22:51 +00:00
sshd_moduli_minimum : 2048
# disable ChallengeResponseAuthentication
ssh_challengeresponseauthentication : false
2018-12-17 12:50:15 +00:00
# a list of public keys that are never accepted by the ssh server
ssh_server_revoked_keys : [ ]
# Set to false to turn the role into a no-op. Useful when using
# the Ansible role dependency mechanism.
2020-05-15 20:41:39 +00:00
ssh_hardening_enabled : true
# Custom options for SSH client configuration file
ssh_custom_options : [ ]
# Custom options for SSH daemon configuration file
sshd_custom_options : [ ]
# Logging
sshd_syslog_facility : 'AUTH'
sshd_log_level : 'VERBOSE'
sshd_strict_modes : yes
2021-02-18 15:40:18 +00:00
# disable CRYPTO_POLICY to take settings from sshd configuration
# see: https://access.redhat.com/solutions/4410591
sshd_disable_crypto_policy : true