[Services] Allow X11 forwarding, disable root password auth by default

This commit is contained in:
Antoine Viallon 2022-04-04 19:57:45 +02:00
parent ebe5406925
commit 2d2c8d4ce4
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -46,9 +46,13 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh = {
# services.openssh.permitRootLogin = "prohibit-password"; enable = true;
services.openssh.permitRootLogin = mkDefault "yes"; permitRootLogin = mkDefault "prohibit-password";
forwardX11 = mkDefault true;
openFirewall = true;
};
networking.firewall.allowedTCPPorts = [ 22 ]; networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedUDPPorts = [ 22 ]; networking.firewall.allowedUDPPorts = [ 22 ];