Properly configure sshd

This commit is contained in:
Benson Chu 2023-12-15 08:02:05 -06:00
parent 7b8f9a76b7
commit 0e5309bd6b

View file

@ -64,7 +64,26 @@ in
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh = {
enable = true;
ports = [ 2222 ];
settings = {
X11Forwarding = true;
PasswordAuthentication = false;
PermitRootLogin = "no";
};
extraConfig = ''
ChallengeResponseAuthentication no
Match Address 192.168.0.0/16,!192.168.1.254
X11UseLocalhost yes
X11Forwarding yes
PasswordAuthentication yes
ChallengeResponseAuthentication yes
'';
};
services.tailscale.enable = true;
environment.systemPackages = with pkgs; [