mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
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
@ -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 New Issue
Block a user