feat: harden sshd on server
This commit is contained in:
parent
2652248bc3
commit
77225f2fa1
1 changed files with 13 additions and 1 deletions
|
|
@ -25,7 +25,19 @@
|
|||
|
||||
networking.hostName = "${hostName}";
|
||||
|
||||
services.openssh.enable = true;
|
||||
# hardened openssh
|
||||
services.openssh = {
|
||||
passwordAuthentication = false;
|
||||
allowSFTP = false;
|
||||
challengeResponseAuthentication = false;
|
||||
extraConfig = ''
|
||||
AllowTcpForwarding yes
|
||||
X11Forwarding no
|
||||
AllowAgentForwarding no
|
||||
AllowStreamLocalForwarding no
|
||||
AuthenticationMethods publickey
|
||||
'';
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue