def gen_host_key(key_path): ssh_key, _ = ssh_key_gen() with open(key_path, 'w') as f: f.write(ssh_key)
def gen_host_key(key_path): # 如果没有则生成rsa加密算法的公私钥 ssh_key, _ = ssh_key_gen() with open(key_path, 'w') as f: f.write(ssh_key)