mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-08-27 13:54:03 +02:00
security: disable SSH X11 forwarding on servers, keep on desktops
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
X11Forwarding = true;
|
||||
# Secure by default: X11 forwarding off everywhere; desktops re-enable it
|
||||
# in modules/nixos/desktop/ssh.nix (needed for GUI forwarding).
|
||||
X11Forwarding = lib.mkDefault false;
|
||||
# root user is used for remote deployment, so we need to allow it
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PasswordAuthentication = false; # disable password login
|
||||
|
||||
Reference in New Issue
Block a user