Merge pull request #68887 from teto/ssh_banner
services.openssh: add banner item
This commit is contained in:
commit
f822080b05
1 changed files with 10 additions and 0 deletions
|
@ -232,6 +232,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
banner = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = ''
|
||||
Message to display to the remote user before authentication is allowed.
|
||||
'';
|
||||
};
|
||||
|
||||
authorizedKeysFiles = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
|
@ -474,6 +482,8 @@ in
|
|||
''
|
||||
UsePAM yes
|
||||
|
||||
Banner ${if cfg.banner == null then "none" else pkgs.writeText "ssh_banner" cfg.banner}
|
||||
|
||||
AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
|
||||
${concatMapStrings (port: ''
|
||||
Port ${toString port}
|
||||
|
|
Loading…
Reference in a new issue