35 lines
666 B
Nix
35 lines
666 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PermitRootLogin = "no";
|
|
PasswordAuthentication = false;
|
|
KbdInteractiveAuthentication = false;
|
|
|
|
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"
|
|
];
|
|
};
|
|
|
|
extraConfig = ''
|
|
TrustedUserCAKeys ${./ca.pub}
|
|
'';
|
|
};
|
|
|
|
security.pam.ussh = {
|
|
enable = true;
|
|
caFile = ./ca.pub;
|
|
};
|
|
|
|
programs.mosh.enable = true;
|
|
}
|