ssh: Add Newline to KnownHostsText
SSH expects a new line at the end of known_hosts file. Without a new line the next entry goes on the same line as the last entry in known_hosts causing errors.
This commit is contained in:
parent
450f0c93e0
commit
d9df350695
1 changed files with 2 additions and 2 deletions
|
@ -20,11 +20,11 @@ let
|
|||
|
||||
knownHosts = map (h: getAttr h cfg.knownHosts) (attrNames cfg.knownHosts);
|
||||
|
||||
knownHostsText = flip (concatMapStringsSep "\n") knownHosts
|
||||
knownHostsText = (flip (concatMapStringsSep "\n") knownHosts
|
||||
(h: assert h.hostNames != [];
|
||||
concatStringsSep "," h.hostNames + " "
|
||||
+ (if h.publicKey != null then h.publicKey else readFile h.publicKeyFile)
|
||||
);
|
||||
)) + "\n";
|
||||
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue