a
This commit is contained in:
parent
459a7d82e5
commit
a7a04f6b40
2 changed files with 1 additions and 0 deletions
Binary file not shown.
|
@ -18,5 +18,6 @@ def setup(ceph_url, ssh_username):
|
||||||
except Exception:
|
except Exception:
|
||||||
p = subprocess.check_output(f"ssh-keyscan {ceph_url}".split())
|
p = subprocess.check_output(f"ssh-keyscan {ceph_url}".split())
|
||||||
keys = p.decode("utf-8").strip().split("\n")
|
keys = p.decode("utf-8").strip().split("\n")
|
||||||
|
print(keys)
|
||||||
with open(os.path.expanduser("~/.ssh/known_hosts"), "a") as known_hosts:
|
with open(os.path.expanduser("~/.ssh/known_hosts"), "a") as known_hosts:
|
||||||
known_hosts.writelines(keys)
|
known_hosts.writelines(keys)
|
Loading…
Add table
Reference in a new issue