configurations for my servers and desktops
nix nixos flake dots dotfiles

fix: openssh settings

+13 -7
+8 -5
hosts/bluepill/default.nix
··· 19 19 networking.hostName = "bluepill"; 20 20 networking.useNetworkd = true; 21 21 22 - services.openssh.extraConfig = '' 23 - AllowUsers git 24 - Match Address 192.168.4.0/22,100.64.0.0/10 25 - AllowUsers * 26 - ''; 22 + services.openssh = { 23 + enable = true; 24 + settings.AllowUsers = ["git"]; 25 + extraConfig = '' 26 + Match Address 192.168.4.0/22,100.64.0.0/10 27 + AllowUsers * 28 + ''; 29 + }; 27 30 28 31 system.autoUpgrade = { 29 32 enable = true;
+5 -2
modules/nixos/modules/ssh.nix
··· 2 2 services = { 3 3 openssh = { 4 4 enable = true; 5 - settings.PasswordAuthentication = false; 6 - settings.PermitRootLogin = "no"; 5 + settings = { 6 + PasswordAuthentication = false; 7 + KbdInteractiveAuthentication = false; 8 + PermitRootLogin = "no"; 9 + }; 7 10 }; 8 11 fail2ban.enable = true; 9 12 };