modules/programs/ssh.nix: configure AddressFamily properly

Explicitly restrict ssh clients to use of IPv4 addresses if IPv6 support is not enabled.
This commit is contained in:
Peter Simons 2012-10-29 17:10:17 +01:00
parent ae861c8e33
commit 9c74f9a51b

View File

@ -42,6 +42,7 @@ in
[ { # SSH configuration. Slight duplication of the sshd_config
# generation in the sshd service.
source = pkgs.writeText "ssh_config" ''
AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
${optionalString cfg.setXAuthLocation ''
XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
''}