Files
vps-nixos/hosts/common/core/openssh.nix
T
aloslider 67b1571e28 Init
Initial commit, nodes are mostly done, panel is WIP
2026-11-17 10:47:39 +03:00

24 lines
468 B
Nix

{ config, lib, ... }:
let
cfg = config.vps.ssh;
in
{
options.vps.ssh = {
public = lib.mkEnableOption "SSH on the public interface";
};
config = {
services.openssh = {
enable = cfg.public;
ports = [ 22 ];
settings = {
PasswordAuthentication = false;
PermitEmptyPasswords = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
PubkeyAuthentication = true;
};
};
};
}