ssh: Read host keys from data file; rename from openssh
This commit is contained in:
parent
d43962290d
commit
45831f553b
5 changed files with 30 additions and 30 deletions
21
common/ssh.nix
Normal file
21
common/ssh.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) concatMapAttrs;
|
||||
keys = import ../keys.nix;
|
||||
in
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.knownHosts = concatMapAttrs
|
||||
(host: key: {
|
||||
"${host}.birdsong.network".publicKey = key;
|
||||
})
|
||||
keys.machines;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue