2024-04-09 04:52:17 +03:00
|
|
|
{ secret, ... }: {
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = secret.ssh.trustedKeys;
|
2024-05-04 23:15:57 +03:00
|
|
|
|
2024-03-04 00:34:39 +03:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
allowSFTP = true;
|
|
|
|
ports = [ 22143 ];
|
|
|
|
listenAddresses = [
|
|
|
|
{
|
|
|
|
addr = "0.0.0.0";
|
|
|
|
port = 22143;
|
|
|
|
}
|
|
|
|
];
|
2024-03-09 20:13:06 +03:00
|
|
|
settings = {
|
2024-04-14 06:44:00 +03:00
|
|
|
AllowUsers = [ "root" "nixbuilder" ];
|
2024-03-04 00:34:39 +03:00
|
|
|
LoginGraceTime = "1m";
|
2024-04-09 16:48:57 +03:00
|
|
|
# MaxAuthTries = 1;
|
2024-03-04 00:34:39 +03:00
|
|
|
MaxSessions = 10;
|
2024-03-09 20:13:06 +03:00
|
|
|
PermitRootLogin = "prohibit-password";
|
2024-03-04 00:34:39 +03:00
|
|
|
StrictModes = false;
|
|
|
|
|
|
|
|
UseDns = false;
|
|
|
|
UsePAM = true;
|
|
|
|
|
|
|
|
GSSAPIAuthentication = false;
|
|
|
|
HostbasedAuthentication = false;
|
2024-03-09 20:13:06 +03:00
|
|
|
KbdInteractiveAuthentication = false;
|
2024-03-04 00:34:39 +03:00
|
|
|
KerberosAuthentication = false;
|
2024-03-09 20:13:06 +03:00
|
|
|
PasswordAuthentication = false;
|
2024-03-04 00:34:39 +03:00
|
|
|
PermitEmptyPasswords = false;
|
2024-03-09 19:35:05 +03:00
|
|
|
PubkeyAuthentication = true;
|
2024-03-04 00:34:39 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|