all: make sshd print motd

This commit is contained in:
Aaron Bieber 2024-06-14 07:01:26 -06:00
parent f98b6b75f5
commit 0b5df84c8e
No known key found for this signature in database

View File

@ -159,7 +159,11 @@ in
}; };
environment = { environment = {
etc."ssh/ca.pub" = { text = caPubKeys; }; etc = {
"ssh/ca.pub" = { text = caPubKeys; };
motd = { text = config.users.motd; };
};
systemPackages = with pkgs; systemPackages = with pkgs;
[ [
age age
@ -243,6 +247,7 @@ in
TrustedUserCAKeys = /etc/ssh/ca.pub TrustedUserCAKeys = /etc/ssh/ca.pub
''; '';
settings = { settings = {
PrintMotd = true;
PermitRootLogin = "prohibit-password"; PermitRootLogin = "prohibit-password";
PasswordAuthentication = false; PasswordAuthentication = false;
KexAlgorithms = [ "curve25519-sha256" "curve25519-sha256@libssh.org" ]; KexAlgorithms = [ "curve25519-sha256" "curve25519-sha256@libssh.org" ];