def install_ssh_priv_key(): ssh_dir = utils.ssh_key_dir('hdfs') ssh_dir.makedirs_p() keyfile = ssh_dir / 'id_rsa' keyfile.write_text(leadership.leader_get('ssh-key-priv'))
def install_ssh_pub_key(): ssh_dir = utils.ssh_key_dir('hdfs') ssh_dir.makedirs_p() authfile = ssh_dir / 'authorized_keys' authfile.write_lines([leadership.leader_get('ssh-key-pub')], append=True)