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}