SSH: Difference between revisions
m Fixed typo in "Client" |
m fix indentation |
||
| Line 17: | Line 17: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
services.openssh = { | |||
enable = true; | |||
openFirewall = true; | |||
settings = { | |||
PasswordAuthentication = false; | |||
KbdInteractiveAuthentication = false; | |||
PermitRootLogin = "no"; | |||
AllowUsers = [ "myUser" ]; | |||
MaxAuthTries = 3; | |||
PerSourcePenalties = "crash:3600s authfail:3600s max:86400s"; | |||
}; | }; | ||
}; | |||
</nowiki> | </nowiki> | ||
|name=/etc/nixos/configuration.nix|lang=nix}} | |name=/etc/nixos/configuration.nix|lang=nix}} | ||
| Line 43: | Line 43: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
programs.ssh = { | |||
extraConfig = " | |||
Host myhost | |||
Hostname 192.168.1.123 | |||
Port 22 | |||
User user | |||
"; | |||
}; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||