1
0
nixfiles/configuration/common/ssh.nix

20 lines
460 B
Nix
Raw Normal View History

{ lib, ... }:
{
services.openssh.enable = true;
services.openssh.settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = lib.mkDefault "no";
# Hotfix CVE-2024-6387 https://github.com/NixOS/nixpkgs/pull/323753
LoginGraceTime = 0;
};
services.openssh.hostKeys = lib.mkForce [
# Only create ed25519 host keys
{ type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; }
];
}