2024-03-04 00:34:39 +03:00
|
|
|
{ ... }: {
|
2024-03-09 19:56:45 +03:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
2024-03-17 01:22:54 +03:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuuw5ek5wGB9KdBhCTxjV+CBpPU6RIOynHkFYC4dau3 root@dasha"
|
2024-03-09 19:56:45 +03:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGIf192IxsksM6u8UY+eqpHopebgV+NNq2G03ssdXIgz root@desktop"
|
2024-03-09 20:01:26 +03:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJSWdbkYsRiDlKu8iT/k+JN4KY08iX9qh4VyqxlpEZcE root@home"
|
2024-03-09 20:13:06 +03:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFgiYKFkMfiGOZCZIk+O7LtaoF6A3cHEFCqaPwXOM4rR root@work"
|
2024-04-05 21:07:07 +03:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBL5NAm8S97EtfB/7DPf5Xl3Cqi3PlSO1V0m7fknNzz root@laptop"
|
2024-03-09 20:10:51 +03:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIL2LI1iFDZC223aWqBVz9yusfB/XrRwsBKiL5warIF/ nix-on-droid@phone"
|
2024-03-09 19:56:45 +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-03-04 00:34:39 +03:00
|
|
|
AllowUsers = [ "root" ];
|
|
|
|
LoginGraceTime = "1m";
|
2024-03-09 20:13:06 +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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|