1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-18 23:50:07 +03:00

Merge pull request #68887 from teto/ssh_banner

services.openssh: add banner item
This commit is contained in:
Silvan Mosberger 2020-09-06 22:15:25 +02:00 committed by GitHub
commit f822080b05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 { authorizedKeysFiles = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
@ -474,6 +482,8 @@ in
'' ''
UsePAM yes 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"} AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
${concatMapStrings (port: '' ${concatMapStrings (port: ''
Port ${toString port} Port ${toString port}