blob: 665532f6c71c1321ac3ed71ac5881e5aefbe2332 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ lib, config, ... }:
{
programs.ssh.startAgent = false;
security.pam.sshAgentAuth.enable = true;
services = {
fail2ban.jails.sshd.settings = {
enabled = true;
filter = "sshd[mode=aggressive]";
port = lib.strings.concatStringsSep "," (map toString config.services.openssh.ports);
};
openssh = {
enable = true;
ports = [ 22 ];
openFirewall = false;
settings = {
StreamLocalBindUnlink = "yes";
GatewayPorts = "clientspecified";
KexAlgorithms = [
"curve25519-sha256"
"[email protected]"
"diffie-hellman-group16-sha512"
"diffie-hellman-group18-sha512"
"diffie-hellman-group-exchange-sha256"
"[email protected]"
];
Macs = [
"[email protected]"
"[email protected]"
"[email protected]"
];
};
};
};
}
|