install.fairie/home/private_dot_ssh/system/sshd_config.tmpl
Brian Zalewski 9de3b66c56 Update 55 files
- /home/dot_gnupg/public/0xF0A300E4199A1C33.sig
- /home/dot_gnupg/public/apt.hashicorp.sig
- /home/dot_gnupg/public/linux.wazuh.sig
- /home/dot_gnupg/public/qubes.uman.sig
- /home/dot_ssh/authorized_keys.github.tmpl
- /home/dot_ssh/endlessh/config.tmpl
- /home/dot_ssh/endlessh/run_onchange_after_endlessh.tmpl
- /home/dot_ssh/fail2ban/jail.local.tmpl
- /home/dot_ssh/fail2ban/run_onchange_after_fail2ban.tmpl
- /home/dot_ssh/private_config.tmpl
- /home/dot_ssh/private_id_rsa.tmpl
- /home/dot_ssh/private_ssh-audi.tmpl
- /home/dot_ssh/private_ssh-blue.tmpl
- /home/dot_ssh/private_ssh-fiat.tmpl
- /home/dot_ssh/private_ssh-honda.tmpl
- /home/dot_ssh/private_ssh-lab.pub.tmpl
- /home/dot_ssh/private_ssh-lab.tmpl
- /home/dot_ssh/private_ssh-mini.tmpl
- /home/dot_ssh/private_ssh-red.tmpl
- /home/dot_ssh/private_ssh-yellow.tmpl
- /home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl
- /home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl
- /home/dot_ssh/ssh-authorized_keys.yubikey.tmpl
- /home/dot_ssh/symlink_authorized_keys.tmpl
- /home/dot_ssh/system/banner
- /home/dot_ssh/system/run_onchange_after_sshd.tmpl
- /home/dot_ssh/system/sshd_config.tmpl
- /home/private_dot_gnupg/public/linux.wazuh.sig
- /home/private_dot_gnupg/public/0xF0A300E4199A1C33.sig
- /home/private_dot_gnupg/public/qubes.uman.sig
- /home/private_dot_gnupg/public/apt.hashicorp.sig
- /home/private_dot_ssh/endlessh/config.tmpl
- /home/private_dot_ssh/endlessh/run_onchange_after_endlessh.tmpl
- /home/private_dot_ssh/fail2ban/jail.local.tmpl
- /home/private_dot_ssh/fail2ban/run_onchange_after_fail2ban.tmpl
- /home/private_dot_ssh/system/banner
- /home/private_dot_ssh/system/run_onchange_after_sshd.tmpl
- /home/private_dot_ssh/system/sshd_config.tmpl
- /home/private_dot_ssh/private_ssh-mini.tmpl
- /home/private_dot_ssh/symlink_authorized_keys.tmpl
- /home/private_dot_ssh/private_ssh-audi.tmpl
- /home/private_dot_ssh/private_ssh-lab.pub.tmpl
- /home/private_dot_ssh/private_ssh-yellow.tmpl
- /home/private_dot_ssh/private_config.tmpl
- /home/private_dot_ssh/run_onchanges_after_generate-public-keys.tmpl
- /home/private_dot_ssh/private_ssh-fiat.tmpl
- /home/private_dot_ssh/private_ssh-blue.tmpl
- /home/private_dot_ssh/private_ssh-red.tmpl
- /home/private_dot_ssh/ssh-authorized_keys.yubikey.tmpl
- /home/private_dot_ssh/private_ssh-honda.tmpl
- /home/private_dot_ssh/authorized_keys.github.tmpl
- /home/private_dot_ssh/private_id_rsa.tmpl
- /home/private_dot_ssh/run_onchanges_after_ensure-private-key.tmpl
- /home/private_dot_ssh/private_ssh-lab.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl
2023-02-01 16:40:47 +00:00

131 lines
3.4 KiB
Cheetah

# TODO - Figure out difference between /private/etc/ssh and /etc/ssh on macOS
Include /etc/ssh/sshd_config.d/*.conf
Port {{ .host.ssh.port }}
AddressFamily inet
#ListenAddress 0.0.0.0
#ListenAddress ::
### Host keys
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
### Ciphers and keyring
#RekeyLimit default none
### Logging
#SyslogFacility AUTH
#LogLevel INFO
### Authentication
LoginGraceTime 60
{{ if ne .host.distro.family "windows" }}
PermitRootLogin no
{{ else }}
DenyGroups Administrators
{{ end }}
AllowUsers {{ .host.ssh.allowUsers }}
#StrictModes yes
MaxAuthTries 3
#MaxSessions 10
AuthenticationMethods publickey
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no
# Change to no to disable s/key passwords
ChallengeResponseAuthentication no
{{ if ne .host.distro.family "windows" }}
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
{{ end }}
# GSSAPI options
GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
{{ if ne .host.distro.family "windows" }}
#AllowAgentForwarding yes
AllowTcpForwarding {{ .host.ssh.allowTCPForwarding }}
#GatewayPorts no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
ClientAliveInterval 60
ClientAliveCountMax 3
UseDNS no
# Experiment with this
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# pass locale information
AcceptEnv LANG LC_*
# no default banner path
Banner /etc/ssh/banner
# override default of no subsystems
# TODO - Figure out how to detect the sftp path to place here. i.e. replicate the following Ansible logic
# using Go templating:
# - name: Find the path of the sftp-server executable
# find:
# paths: /usr
# file_type: file
# patterns: '*sftp-server'
# recurse: true
# register: sftp_executable
#Subsystem sftp {/{ sftp_executable.files[0].path | default('internal-sftp') }/}
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
{{ end }}