Files
nix-dotfiles/hosts/common/services/openssh.nix
2025-03-17 09:48:19 +01:00

33 lines
837 B
Nix

{ lib, ... }:
{
services.openssh = {
enable = lib.mkDefault true;
startWhenNeeded = true;
settings = {
StreamLocalBindUnlink = true;
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
PermitEmptyPasswords = false;
ChallengeResponseAuthentication = false;
GSSAPIAuthentication = false;
HostbasedAuthentication = false;
IgnoreRhosts = true;
KerberosAuthentication = false;
RhostsRSAAuthentication = false;
Protocol = "2";
Macs = [
"hmac-sha2-512-etm@openssh.com"
"hmac-sha2-256-etm@openssh.com"
"umac-128-etm@openssh.com"
"hmac-sha2-512"
];
};
};
# systemd.services."sshd@".serviceConfig = {
# Nice = -15;
# IOSchedulingClass = "realtime";
# };
}