Commit a9e65ab0 authored by Tilman Vatteroth's avatar Tilman Vatteroth 💻

correct to guidelines

parent ca2cd7c3
---
sshd_port 22
sshd_permit_root_login no
sshd_allow_pubkeys yes
......
---
- name: start sshd
systemd:
name: sshd
......
---
- name: install openssh-server
apt:
name: openssh-server
......
......@@ -7,77 +7,22 @@ Port {{ sshd_port }}
ListenAddress {{ item }}
{% endfor %}
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LoginGraceTime 2m
PermitRootLogin {{ 'yes' if sshd_permit_root_login else 'no' }}
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
# Authentication
PubkeyAuthentication {{ 'yes' if sshd_allow_pubkeys else 'no' }}
PasswordAuthentication {{ 'yes' if sshd_allow_passwords else 'no' }}
PermitEmptyPasswords no
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!
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# 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
AllowAgentForwarding {{ 'yes' if sshd_agent_forwarding else 'no' }}
AllowTcpForwarding {{ 'yes' if sshd_tcp_forwarding else 'no' }}
#GatewayPorts no
X11Forwarding {{ 'yes' if sshd_x11_forwarding else 'no' }}
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd {{ 'yes' if sshd_print_motd else 'no' }}
#PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment