server/ssh.nix
2024-04-07 00:58:22 +02:00

26 lines
501 B
Nix

{ config, pkgs, ... }:
{
users.users.kamov = {
isNormalUser = true;
extraGroups = [ "wheel" "www" ];
openssh.authorizedKeys.keyFiles = [ /root/.ssh/kamov.pub ];
};
networking.firewall.allowedTCPPorts = [ 22 2222 ];
services = {
endlessh = {
enable = true;
port = 22;
};
openssh = {
enable = true;
ports = [ 2222 ];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
};
}