feat: get to a solid bootstrap on public ssh
This commit is contained in:
parent
642869ce9b
commit
3850948f71
27 changed files with 262 additions and 865 deletions
29
modules/deploy-ssh.nix
Normal file
29
modules/deploy-ssh.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
AllowAgentForwarding = false;
|
||||
AllowGroups = [ "wheel" ];
|
||||
AllowTcpForwarding = false;
|
||||
ClientAliveCountMax = 2;
|
||||
ClientAliveInterval = 300;
|
||||
KbdInteractiveAuthentication = false;
|
||||
LoginGraceTime = 20;
|
||||
MaxAuthTries = 3;
|
||||
MaxSessions = 4;
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
PermitTunnel = false;
|
||||
PermitUserEnvironment = false;
|
||||
StreamLocalBindUnlink = false;
|
||||
X11Forwarding = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue