aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/networking/ssh/sshd.nix')
-rw-r--r--nixpkgs/nixos/modules/services/networking/ssh/sshd.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix b/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
index 17f31e3a488..5365b8b9b10 100644
--- a/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
@@ -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 = [];
@@ -361,7 +369,7 @@ in
};
users.users = mkOption {
- type = with types; loaOf (submodule userOptions);
+ type = with types; attrsOf (submodule userOptions);
};
};
@@ -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}