summary refs log tree commit diff
path: root/profiles/ssh.nix
blob: a6c667f77bce85f920a66e3a6b520f486851d252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  pkgs,
  lib,
  config,
  ...
}: {
  config = {
    services.openssh = {
      enable = true;
      openFirewall = false;
      allowSFTP = true;
      startWhenNeeded = true;
      extraConfig = ''
        AllowTcpForwarding yes
        X11Forwarding no
        AllowAgentForwarding no
        AllowStreamLocalForwarding no
        AuthenticationMethods publickey
        StreamLocalBindUnlink yes

        AllowUsers tzlil git
      '';
      settings = {
        PermitRootLogin = "no";
        PasswordAuthentication = false;
        KbdInteractiveAuthentication = false;
      };
    };
  };
}