Skip to content

Commit

Permalink
Add new configuration options from OpenSSH 9.8
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Jelen <[email protected]>
  • Loading branch information
Jakuje committed Aug 19, 2024
1 parent 7c58804 commit 4478b2b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,4 +486,4 @@ Matt Willsher <[email protected]>

Jakub Jelen <[email protected]>

&copy; 2020 - 2022 Red Hat, Inc.
&copy; 2020 - 2024 Red Hat, Inc.
4 changes: 4 additions & 0 deletions meta/options_body
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ MaxSessions
MaxStartups
ModuliFile
NoneEnabled
PAMServiceName
PasswordAuthentication
PermitEmptyPasswords
PermitListen
Expand All @@ -82,6 +83,8 @@ PermitTTY
PermitTunnel
PermitUserEnvironment
PermitUserRC
PerSourcePenalties
PerSourcePenaltyExemptList
PerSourceMaxStartups
PerSourceNetBlockSize
PidFile
Expand All @@ -102,6 +105,7 @@ SecurityKeyProvider
SetEnv
ServerKeyBits
ShowPatchLevel
SshdSessionPath
StreamLocalBindMask
StreamLocalBindUnlink
StrictModes
Expand Down
1 change: 1 addition & 0 deletions meta/options_match
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ KerberosAuthentication
LogLevel
MaxAuthTries
MaxSessions
PAMServiceName
PasswordAuthentication
PermitEmptyPasswords
PermitListen
Expand Down
5 changes: 5 additions & 0 deletions templates/sshd_config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Match {{ match["Condition"] }}
{{ render_option("LogLevel",match["LogLevel"],true) -}}
{{ render_option("MaxAuthTries",match["MaxAuthTries"],true) -}}
{{ render_option("MaxSessions",match["MaxSessions"],true) -}}
{{ render_option("PAMServiceName",match["PAMServiceName"],true) -}}
{{ render_option("PasswordAuthentication",match["PasswordAuthentication"],true) -}}
{{ render_option("PermitEmptyPasswords",match["PermitEmptyPasswords"],true) -}}
{{ render_option("PermitListen",match["PermitListen"],true) -}}
Expand Down Expand Up @@ -197,6 +198,7 @@ Match {{ match["Condition"] }}
{{ body_option("MaxStartups",sshd_MaxStartups) -}}
{{ body_option("ModuliFile",sshd_ModuliFile) -}}
{{ body_option("NoneEnabled",sshd_NoneEnabled) -}}
{{ body_option("PAMServiceName",sshd_PAMServiceName) -}}
{{ body_option("PasswordAuthentication",sshd_PasswordAuthentication) -}}
{{ body_option("PermitEmptyPasswords",sshd_PermitEmptyPasswords) -}}
{{ body_option("PermitListen",sshd_PermitListen) -}}
Expand All @@ -206,6 +208,8 @@ Match {{ match["Condition"] }}
{{ body_option("PermitTunnel",sshd_PermitTunnel) -}}
{{ body_option("PermitUserEnvironment",sshd_PermitUserEnvironment) -}}
{{ body_option("PermitUserRC",sshd_PermitUserRC) -}}
{{ body_option("PerSourcePenalties",sshd_PerSourcePenalties) -}}
{{ body_option("PerSourcePenaltyExemptList",sshd_PerSourcePenaltyExemptList) -}}
{{ body_option("PerSourceMaxStartups",sshd_PerSourceMaxStartups) -}}
{{ body_option("PerSourceNetBlockSize",sshd_PerSourceNetBlockSize) -}}
{{ body_option("PidFile",sshd_PidFile) -}}
Expand All @@ -226,6 +230,7 @@ Match {{ match["Condition"] }}
{{ body_option("SetEnv",sshd_SetEnv) -}}
{{ body_option("ServerKeyBits",sshd_ServerKeyBits) -}}
{{ body_option("ShowPatchLevel",sshd_ShowPatchLevel) -}}
{{ body_option("SshdSessionPath",sshd_SshdSessionPath) -}}
{{ body_option("StreamLocalBindMask",sshd_StreamLocalBindMask) -}}
{{ body_option("StreamLocalBindUnlink",sshd_StreamLocalBindUnlink) -}}
{{ body_option("StrictModes",sshd_StrictModes) -}}
Expand Down
5 changes: 5 additions & 0 deletions templates/sshd_config_snippet.j2
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Match {{ match["Condition"] }}
{{ render_option("LogLevel",match["LogLevel"],true) -}}
{{ render_option("MaxAuthTries",match["MaxAuthTries"],true) -}}
{{ render_option("MaxSessions",match["MaxSessions"],true) -}}
{{ render_option("PAMServiceName",match["PAMServiceName"],true) -}}
{{ render_option("PasswordAuthentication",match["PasswordAuthentication"],true) -}}
{{ render_option("PermitEmptyPasswords",match["PermitEmptyPasswords"],true) -}}
{{ render_option("PermitListen",match["PermitListen"],true) -}}
Expand Down Expand Up @@ -195,6 +196,7 @@ Match {{ match["Condition"] }}
{{ body_option("MaxStartups",sshd_MaxStartups) -}}
{{ body_option("ModuliFile",sshd_ModuliFile) -}}
{{ body_option("NoneEnabled",sshd_NoneEnabled) -}}
{{ body_option("PAMServiceName",sshd_PAMServiceName) -}}
{{ body_option("PasswordAuthentication",sshd_PasswordAuthentication) -}}
{{ body_option("PermitEmptyPasswords",sshd_PermitEmptyPasswords) -}}
{{ body_option("PermitListen",sshd_PermitListen) -}}
Expand All @@ -204,6 +206,8 @@ Match {{ match["Condition"] }}
{{ body_option("PermitTunnel",sshd_PermitTunnel) -}}
{{ body_option("PermitUserEnvironment",sshd_PermitUserEnvironment) -}}
{{ body_option("PermitUserRC",sshd_PermitUserRC) -}}
{{ body_option("PerSourcePenalties",sshd_PerSourcePenalties) -}}
{{ body_option("PerSourcePenaltyExemptList",sshd_PerSourcePenaltyExemptList) -}}
{{ body_option("PerSourceMaxStartups",sshd_PerSourceMaxStartups) -}}
{{ body_option("PerSourceNetBlockSize",sshd_PerSourceNetBlockSize) -}}
{{ body_option("PidFile",sshd_PidFile) -}}
Expand All @@ -224,6 +228,7 @@ Match {{ match["Condition"] }}
{{ body_option("SetEnv",sshd_SetEnv) -}}
{{ body_option("ServerKeyBits",sshd_ServerKeyBits) -}}
{{ body_option("ShowPatchLevel",sshd_ShowPatchLevel) -}}
{{ body_option("SshdSessionPath",sshd_SshdSessionPath) -}}
{{ body_option("StreamLocalBindMask",sshd_StreamLocalBindMask) -}}
{{ body_option("StreamLocalBindUnlink",sshd_StreamLocalBindUnlink) -}}
{{ body_option("StrictModes",sshd_StrictModes) -}}
Expand Down

0 comments on commit 4478b2b

Please sign in to comment.