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