nix-deploy/config/common/services/ssh.nix

26 lines
701 B
Nix
Raw Normal View History

2022-02-26 16:09:12 +01:00
{ config, ... }:
2021-09-23 16:45:06 +02:00
{
services.openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
challengeResponseAuthentication = false;
2022-02-26 16:09:12 +01:00
hostKeys = [ { path = config.secrets.files.ssh_host_ed25519_key.file; type = "ed25519"; } ];
2021-09-23 16:45:06 +02:00
kexAlgorithms = [ "curve25519-sha256" "curve25519-sha256@libssh.org" ];
macs = [ "hmac-sha2-512-etm@openssh.com" "hmac-sha2-512-etm@openssh.com" "umac-128-etm@openssh.com" ];
2022-02-26 16:09:12 +01:00
2021-09-23 16:45:06 +02:00
};
2021-09-27 14:55:55 +02:00
programs.ssh.knownHosts = {
despondos = {
hostNames = [ "despondos.nao.sh" ];
publicKeyFile = ../data/pubkeys/despondos_host_ed25519_key.pub;
};
};
services.sshguard = {
enable = true;
blocktime = 300;
};
2021-09-23 16:45:06 +02:00
}