Networking: ssh
This commit is contained in:
parent
4bfaa821c0
commit
10cb43f7d6
2 changed files with 28 additions and 1 deletions
|
@ -8,7 +8,7 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
#./firewall
|
#./firewall
|
||||||
|
|
||||||
#./ssh.nix
|
./ssh.nix
|
||||||
#./tailscale.nix
|
#./tailscale.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
27
modules/nixos/networking/ssh.nix
Normal file
27
modules/nixos/networking/ssh.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
|
||||||
|
ClientAliveCountMax = 5;
|
||||||
|
ClientAliveInterval = 60;
|
||||||
|
};
|
||||||
|
openFirewall = true;
|
||||||
|
ports = [22];
|
||||||
|
|
||||||
|
hostKeys = [
|
||||||
|
{
|
||||||
|
bits = 4096;
|
||||||
|
path = "/etc/ssh/ssh_host_rsa_key";
|
||||||
|
type = "rsa";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
bits = 4096;
|
||||||
|
path = "/etc/ssh/ssh_host_ed25519_key";
|
||||||
|
type = "ed25519";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue