Revision 75a5f456 lib/ssh.py
b/lib/ssh.py | ||
---|---|---|
212 | 212 |
return False, "hostname mismatch, got %s" % remotehostname |
213 | 213 |
|
214 | 214 |
return True, "host matches" |
215 |
|
|
216 |
|
|
217 |
def WriteKnownHostsFile(cfg, sstore, file_name): |
|
218 |
"""Writes the cluster-wide equally known_hosts file. |
|
219 |
|
|
220 |
""" |
|
221 |
utils.WriteFile(file_name, mode=0700, |
|
222 |
data="%s ssh-rsa %s\n" % (sstore.GetClusterName(), |
|
223 |
cfg.GetHostKey())) |
Also available in: Unified diff