3
0
Fork 0
forked from mirrors/nixpkgs

nixos/sshd: only include AuthorizedKeysCommand and AuthorizedKeysCommandUser options if explicitly set

This commit is contained in:
Aaron Andersen 2020-03-14 19:50:11 -04:00
parent 41742c85ec
commit f383fa344e

View file

@ -505,8 +505,10 @@ in
PrintMotd no # handled by pam_motd
AuthorizedKeysFile ${toString cfg.authorizedKeysFiles}
AuthorizedKeysCommand ${cfg.authorizedKeysCommand}
AuthorizedKeysCommandUser ${cfg.authorizedKeysCommandUser}
${optionalString (cfg.authorizedKeysCommand != "none") ''
AuthorizedKeysCommand ${cfg.authorizedKeysCommand}
AuthorizedKeysCommandUser ${cfg.authorizedKeysCommandUser}
''}
${flip concatMapStrings cfg.hostKeys (k: ''
HostKey ${k.path}