summaryrefslogtreecommitdiff
path: root/modules/nixos/networking/hard-ssh.nix
diff options
context:
space:
mode:
authorandromeda <andromeda@lenovo>2026-01-06 14:52:34 +0100
committerandromeda <andromeda@lenovo>2026-01-06 14:52:34 +0100
commitc9a5c521dbc7785aa4a6c1f410e547202075c13b (patch)
tree4362c945c787bac5d7d1bb63d04d7281bfddf6c8 /modules/nixos/networking/hard-ssh.nix
parent0a7e0c699e2f4fa07fb6dde0080da4eb3ac8f746 (diff)
stash
Diffstat (limited to 'modules/nixos/networking/hard-ssh.nix')
-rw-r--r--modules/nixos/networking/hard-ssh.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/nixos/networking/hard-ssh.nix b/modules/nixos/networking/hard-ssh.nix
new file mode 100644
index 0000000..849af9b
--- /dev/null
+++ b/modules/nixos/networking/hard-ssh.nix
@@ -0,0 +1,19 @@
+{
+ services.openssh = {
+ enable = true;
+ allowSFTP = false;
+ ports = [5522];
+ settings = {
+ PermitRootLogin = "no";
+ PasswordAuthentication = false;
+ KbdInteractiveAuthentication = true;
+ };
+ extraConfig = ''
+ AllowTcpForwarding no
+ AllowAgentForwarding no
+ MaxAuthTries 3
+ MaxSessions 4
+ TCPKeepAlive no
+ '';
+ };
+}