mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-08-08 06:30:18 +02:00
more refactoring
This commit is contained in:
parent
dcc640bd56
commit
ed7afeba43
20 changed files with 222 additions and 136 deletions
26
shared/ssh.nix
Normal file
26
shared/ssh.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
services.fail2ban.jails.sshd.settings = {
|
||||
ssh = ''
|
||||
enabled = true
|
||||
port = ssh
|
||||
filter = sshd
|
||||
logpath = %(sshd_log)s
|
||||
maxretry = 5
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue