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