2020-04-11 21:47:33 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
2023-06-06 00:51:11 +00:00
|
|
|
settings = {
|
|
|
|
PermitRootLogin = "no";
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
KbdInteractiveAuthentication = false;
|
2022-08-30 16:15:54 +00:00
|
|
|
|
2023-06-06 00:51:11 +00:00
|
|
|
KexAlgorithms = [
|
|
|
|
"sntrup761x25519-sha512@openssh.com"
|
|
|
|
"curve25519-sha256"
|
|
|
|
"curve25519-sha256@libssh.org"
|
|
|
|
];
|
|
|
|
Macs = [
|
|
|
|
"hmac-sha2-512-etm@openssh.com"
|
|
|
|
"hmac-sha2-256-etm@openssh.com"
|
|
|
|
"umac-128-etm@openssh.com"
|
|
|
|
];
|
|
|
|
};
|
2024-03-23 02:29:08 +00:00
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
TrustedUserCAKeys ${./ca.pub}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
security.pam.ussh = {
|
|
|
|
enable = true;
|
|
|
|
caFile = ./ca.pub;
|
2020-04-11 21:47:33 +00:00
|
|
|
};
|
2023-06-06 01:13:54 +00:00
|
|
|
|
|
|
|
programs.mosh.enable = true;
|
2020-04-11 21:47:33 +00:00
|
|
|
}
|