Restricted SSH access
This commit is contained in:
parent
46fe5b8056
commit
0cf53a97cf
@ -9,19 +9,24 @@ in
|
||||
enable = mkEnableOption "ssh";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh.enable = true;
|
||||
# TODO: Is this default configuration secure?
|
||||
|
||||
services.openssh.hostKeys = mkIf (config.modules.impermanence.enable) [
|
||||
{
|
||||
type = "ed25519";
|
||||
path = "/persist/system/etc/ssh/ssh_host_ed25519_key";
|
||||
}
|
||||
{
|
||||
type = "rsa";
|
||||
bits = 4096;
|
||||
path = "/persist/system/etc/ssh/ssh_host_rsa_key";
|
||||
}
|
||||
];
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
hostKeys = mkIf (config.modules.impermanence.enable) [
|
||||
{
|
||||
type = "ed25519";
|
||||
path = "/persist/system/etc/ssh/ssh_host_ed25519_key";
|
||||
}
|
||||
{
|
||||
type = "rsa";
|
||||
bits = 4096;
|
||||
path = "/persist/system/etc/ssh/ssh_host_rsa_key";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user