a
This commit is contained in:
parent
b0c819d930
commit
4bb647d595
1 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,10 @@ def ceph():
|
||||||
@click.option("--ssh_username", required=True)
|
@click.option("--ssh_username", required=True)
|
||||||
@click.option("--ssh_key_path", required=True, help="For Example, ~/.ssh/id_rsa")
|
@click.option("--ssh_key_path", required=True, help="For Example, ~/.ssh/id_rsa")
|
||||||
def setup(ceph_url, ssh_username, ssh_key_path):
|
def setup(ceph_url, ssh_username, ssh_key_path):
|
||||||
|
|
||||||
|
cnopts = pysftp.CnOpts()
|
||||||
|
cnopts.hostkeys = None # disable host key checking.
|
||||||
with pysftp.Connection(host=ceph_url, username=ssh_username,
|
with pysftp.Connection(host=ceph_url, username=ssh_username,
|
||||||
password="",private_key=ssh_key_path) as sftp:
|
password="",private_key=ssh_key_path,
|
||||||
|
cnopts=cnopts) as sftp:
|
||||||
sftp.get_r('/etc/ceph', '/etc/ceph', preserve_mtime=True)
|
sftp.get_r('/etc/ceph', '/etc/ceph', preserve_mtime=True)
|
Loading…
Reference in a new issue