From 7d4ab89f1e6264e124109bf25eafaafdf1aec02a Mon Sep 17 00:00:00 2001 From: Linnnus Date: Tue, 5 Sep 2023 09:48:04 +0200 Subject: Initial commit --- hosts/ahmed/ssh.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hosts/ahmed/ssh.nix (limited to 'hosts/ahmed/ssh.nix') diff --git a/hosts/ahmed/ssh.nix b/hosts/ahmed/ssh.nix new file mode 100644 index 0000000..cedf56e --- /dev/null +++ b/hosts/ahmed/ssh.nix @@ -0,0 +1,19 @@ +# This file configures openSSH on this host. + +{ config, pkgs, lib, ... }: + +{ + # Who is allowed/expected to connect to this machine? + networking.firewall.allowedTCPPorts = [ 22 ]; + services.openssh = { + enable = true; + passwordAuthentication = false; + }; + + users.users = lib.genAttrs ["root" "linus"] (_: { + openssh.authorizedKeys.keys = + [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDcmUCfFA/arYpT0zBWoOXcyxN5bgk5cMrWgTIol5RsHB82VzoS+LG3IV4IwBz4QALaCj5DlhfbasGKMkFRgFvLerEtBleIb58RtOXIOf6TIUaqpyHB3h2CjdwrbmyjjWEl9W2BTpadrR5uPr0HoeED8dCFYE5cPjrSELtrYxEW0o1DBJw8bXfpgyYB21loBzrcOhRsrPSaS0gYHZLGY7Av7FGfncVZDLNYL0/pZ/t0UWD6JF+6FgOdGWAuuwSt5WR9DVxGilVG5aFktDB14fNPEBIVf7tkT4/McAihR/u344yaiUWA4bV7w039Ubhn9NdnoBSvGrP6jTy/zDgq5ywFj8aqcdlahxtELNWgxYYrI8HZzvITKo1FU7BOcUN1vNS4npOvyWBl7s3jFCO+R2E/BoyjfsjYTylacpepf26D87U32jNsh39OKdHxRF3/qmMGYa1L7N4M0iT9WFEMCcKB/MMAcHgE25vWPQaY1orU8X8NZPhxjfIVcw1rqcjwCryNwb1ZOMTIEc9kbGiP99MhE7ZA0yvHZfMezeymSwg1kN+iJDTp24gSsFtYuz5vm9lRu/PzfU9lNlp2KHdaLISUouSCCHPgF7zZSWtXa1B920zrAg2Fco8/Iymh+Fa0UNnrbnfyQTgLeNT12SLD4Y5gHimUsuq8tFkxjR6WffmrRw== linusvejlo@gmail.com" + ]; + }); +} -- cgit v1.2.3