Added a non root user

This commit is contained in:
2026-05-27 22:53:50 +01:00
parent 46b66d8508
commit 1cd3fb890e

View File

@ -60,18 +60,25 @@
ports = [ 222 ];
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
# Disable root SSH login entirely
PermitRootLogin = "no";
};
};
# SSHGuard — monitors logs for brute-force attempts and blocks offending IPs
services.sshguard.enable = true;
# Security
security.sudo.wheelNeedsPassword = true;
# Security — passwordless sudo for wheel group
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
# User configuration
users.users.root = {
users.users.kawaiipunk = {
isNormalUser = true;
# wheel group enables sudo access
extraGroups = [ "wheel" "docker" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMniNzAzuI527bfk/EipqFILFayUCwYXDoZ3R7+QgYq6 kawaiipunk@ZeroCool"
];