This commit is contained in:
Yan Lin 2025-09-13 21:17:45 +02:00
parent 3b3c58b346
commit 05bfef728b

View file

@ -76,20 +76,20 @@ in
enable = true; enable = true;
ports = [ cfg.sshPort ]; ports = [ cfg.sshPort ];
settings = { settings = {
# SSH hardening for borg users
Match = "Group borg-server";
PasswordAuthentication = false;
PubkeyAuthentication = true;
PermitRootLogin = "no";
X11Forwarding = false;
AllowAgentForwarding = false;
AllowTcpForwarding = false;
PermitTunnel = "no";
# Keep connection alive settings # Keep connection alive settings
ClientAliveInterval = 10; ClientAliveInterval = 10;
ClientAliveCountMax = 30; ClientAliveCountMax = 30;
}; };
extraConfig = ''
# SSH hardening for borg users
Match Group borg-server
PasswordAuthentication no
PubkeyAuthentication yes
X11Forwarding no
AllowAgentForwarding no
AllowTcpForwarding no
PermitTunnel no
'';
}; };
# Open firewall port # Open firewall port