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:
parent
ae861c8e33
commit
9c74f9a51b
@ -42,6 +42,7 @@ in
|
|||||||
[ { # SSH configuration. Slight duplication of the sshd_config
|
[ { # SSH configuration. Slight duplication of the sshd_config
|
||||||
# generation in the sshd service.
|
# generation in the sshd service.
|
||||||
source = pkgs.writeText "ssh_config" ''
|
source = pkgs.writeText "ssh_config" ''
|
||||||
|
AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
|
||||||
${optionalString cfg.setXAuthLocation ''
|
${optionalString cfg.setXAuthLocation ''
|
||||||
XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
|
XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
|
||||||
''}
|
''}
|
||||||
|
Loading…
Reference in New Issue
Block a user