Revision a9542a4f lib/ssh.py
b/lib/ssh.py | ||
---|---|---|
328 | 328 |
"""Writes the cluster-wide equally known_hosts file. |
329 | 329 |
|
330 | 330 |
""" |
331 |
utils.WriteFile(file_name, mode=0600, |
|
332 |
data="%s ssh-rsa %s\n" % (cfg.GetClusterName(), |
|
333 |
cfg.GetHostKey())) |
|
331 |
data = "" |
|
332 |
if cfg.GetRsaHostKey(): |
|
333 |
data += "%s ssh-rsa %s\n" % (cfg.GetClusterName(), cfg.GetRsaHostKey()) |
|
334 |
if cfg.GetDsaHostKey(): |
|
335 |
data += "%s ssh-dss %s\n" % (cfg.GetClusterName(), cfg.GetDsaHostKey()) |
|
336 |
|
|
337 |
utils.WriteFile(file_name, mode=0600, data=data) |
Also available in: Unified diff