Created
December 1, 2022 10:22
-
-
Save kradalby/885ac44105114d64d066ad879e32b189 to your computer and use it in GitHub Desktop.
SSH NixOS bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{pkgs, ...}: { | |
services.openssh = { | |
enable = true; | |
# require public key authentication for better security | |
passwordAuthentication = false; | |
kbdInteractiveAuthentication = false; | |
permitRootLogin = "yes"; | |
}; | |
users.users."root".openssh.authorizedKeys.keys = [ | |
# kramacbook | |
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBV4ZjlUvRDs70qHD/Ldi6OTkFpDEFgfbXbqSnaL2Qup" | |
# dev.ntnu vm | |
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGyrauaLwnrgeR5mpeOBCw/creVh1dMU1a12TTXvQ+Rd" | |
# kraairm2 | |
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGqesfGzltPA+pNVQ667T1tKzQoz09qTcoQshygxl73I3EbYD5vnHFtC+tnziVbfxSx8ZDRvPDN7vHEalE5U3JU=" | |
]; | |
networking.firewall.enable = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment