Files
infrastructure/machines/modules/sshd.nix
2024-10-29 18:14:14 +01:00

13 lines
322 B
Nix

{ config, lib, pkgs, ... }:
let
sshKeys = import ../ssh_keys.nix;
in
{
services.openssh.enable = true;
services.openssh.ports = [ 22 ];
services.openssh.settings.PasswordAuthentication = false;
services.openssh.settings.PermitRootLogin = "no";
users.users.root.openssh.authorizedKeys.keys = sshKeys.admins;
}