You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 26, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: templates/opensshd.conf.j2
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
# ===================
8
8
9
9
# Either disable or only allowssh root login via certificates.
10
-
PermitRootLogin {%ifssh_allow_root_with_key|bool%} without-password {%else%} no {%endif%}
10
+
PermitRootLogin {%if(ssh_allow_root_with_key|bool)%} without-password {%else%} no {%endif%}
11
11
#PermitRootLogin {{ 'without-password' if ssh_allow_root_with_key else 'no' | bool }}
12
12
13
13
# Define which port sshd should listen to. Default to `22`.
@@ -16,7 +16,7 @@ Port {{port}}
16
16
{%endfor%}
17
17
18
18
# Address family should always be limited to the active network configuration.
19
-
AddressFamily {{ 'any' if network_ipv6_enable else 'inet' }}
19
+
AddressFamily {{ 'any' if (network_ipv6_enable|bool) else 'inet' }}
20
20
21
21
# Define which addresses sshd should listen to. Default to `0.0.0.0`, ie make sure you put your desired address in here, since otherwise sshd will listen to everyone.
22
22
{%foraddressinssh_listen_to -%}
@@ -128,12 +128,12 @@ IgnoreUserKnownHosts yes
128
128
HostbasedAuthentication no
129
129
130
130
# Enable PAM to enforce system wide rules
131
-
UsePAM {{ 'yes' if ssh_use_pam else 'no' }}
131
+
UsePAM {{ 'yes' if (ssh_use_pam|bool) else 'no' }}
132
132
133
133
# Disable password-based authentication, it can allow for potentially easier brute-force attacks.
134
-
PasswordAuthentication {{ 'yes' if ssh_server_password_login else 'no' }}
134
+
PasswordAuthentication {{ 'yes' if (ssh_server_password_login|bool) else 'no' }}
135
135
PermitEmptyPasswords no
136
-
ChallengeResponseAuthentication {{ 'yes' if ssh_challengeresponseauthentication else 'no' }}
136
+
ChallengeResponseAuthentication {{ 'yes' if (ssh_challengeresponseauthentication|bool) else 'no' }}
137
137
138
138
# Only enable Kerberos authentication if it is configured.
0 commit comments