Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit ba457ee

Browse files
authored
Merge pull request #240 from bschonec/add_some_parameters
Added ssh_syslog_facility, ssh_log_level and ssh_strict_modes parameters
2 parents 13f698f + f41747c commit ba457ee

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ Warning: This role disables root-login on the target server! Please make sure yo
7676
|`ssh_ciphers` | [] | Change this list to overwrite ciphers. Defaults found in `defaults/main.yml` |
7777
|`ssh_custom_options` | [] | Custom lines for SSH client configuration |
7878
|`sshd_custom_options` | [] | Custom lines for SSH daemon configuration |
79+
|`sshd_syslog_facility` | 'AUTH' | The facility code that is used when logging messages from sshd |
80+
|`sshd_log_level` | 'VERBOSE' | the verbosity level that is used when logging messages from sshd |
81+
|`sshd_strict_modes` | 'yes' | Check file modes and ownership of the user's files and home directory before accepting login |
7982

8083
## Configuring settings not listed in role-variables
8184

defaults/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,9 @@ ssh_custom_options: []
230230

231231
# Custom options for SSH daemon configuration file
232232
sshd_custom_options: []
233+
234+
# Logging
235+
sshd_syslog_facility: 'AUTH'
236+
sshd_log_level: 'VERBOSE'
237+
238+
sshd_strict_modes: yes

templates/opensshd.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ HostKey {{key}} # Req 20
4242
Protocol 2
4343

4444
# Make sure sshd checks file modes and ownership before accepting logins. This prevents accidental misconfiguration.
45-
StrictModes yes
45+
StrictModes {{ 'yes' if (sshd_strict_modes|bool) else 'no' }}
4646

4747
# Logging, obsoletes QuietMode and FascistLogging
48-
SyslogFacility AUTH
49-
LogLevel VERBOSE
48+
SyslogFacility {{ sshd_syslog_facility }}
49+
LogLevel {{ sshd_log_level }}
5050

5151
# Cryptography
5252
# ------------

0 commit comments

Comments
 (0)