From 5bba15fe7f743871a8b8470f41982bbda6899be0 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 2 Jun 2023 16:53:09 +0530 Subject: [PATCH] rico2: configure ssh server --- hosts/rico2/services/default.nix | 3 +-- hosts/rico2/services/ssh.nix | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 hosts/rico2/services/ssh.nix diff --git a/hosts/rico2/services/default.nix b/hosts/rico2/services/default.nix index 34a84ff..46968a6 100644 --- a/hosts/rico2/services/default.nix +++ b/hosts/rico2/services/default.nix @@ -1,4 +1,3 @@ {...}: { - imports = [./caddy.nix ./frpc.nix]; - services.openssh.enable = true; + imports = [./caddy.nix ./frpc.nix ./ssh.nix]; } diff --git a/hosts/rico2/services/ssh.nix b/hosts/rico2/services/ssh.nix new file mode 100644 index 0000000..a315eac --- /dev/null +++ b/hosts/rico2/services/ssh.nix @@ -0,0 +1,9 @@ +{ ... }: { + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; +}