完成登陆,批量执行命令流

This commit is contained in:
ibuler
2015-11-21 19:20:11 +08:00
parent 877383679c
commit 93481a98db
6 changed files with 118 additions and 49 deletions

View File

@@ -51,6 +51,7 @@ def gen_keys():
private_key = os.path.join(key_path_dir, 'id_rsa')
public_key = os.path.join(key_path_dir, 'id_rsa.pub')
key.write_private_key_file(private_key)
os.chmod(private_key, 0644)
with open(public_key, 'w') as content_file:
for data in [key.get_name(),