feat: harden openssh settings

This commit is contained in:
Ivan R. 2024-05-10 18:08:37 +05:00
parent 042f5561cd
commit de591bd560
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C
2 changed files with 15 additions and 6 deletions

View file

@ -30,6 +30,7 @@
./services/mastodon.nix
./services/microboard.nix
./services/nextcloud.nix
./services/openssh.nix
./services/phoenix.nix
./services/prosody.nix
./services/ss.nix
@ -80,12 +81,6 @@
deluged
];
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
powerManagement.powertop.enable = true;
system.stateVersion = "22.11";

View file

@ -0,0 +1,14 @@
{ config, ... }:
{
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
AllowUsers = [
"lumin"
"forgejo"
];
};
};
}