2016-12-11 10 views

答えて

1

これにはParamikoパッケージを使用できます。

import paramiko 


NAO_IP = "put_nao_ip_here" 
NAO_USERNAME = "put_nao_username_here" 
NAO_PASSWORD = "put_nao_password_here" 

ssh = paramiko.SSHClient() 
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 
ssh.connect(NAO_IP, username=NAO_USERNAME, password=NAO_PASSWORD) 
sftp = ssh.open_sftp() 
localpath = 'path to save the file locally with filename' 
remotepath = '/recordings/cameras/<filename>' 
sftp.get(remotepath, localpath) 
sftp.close() 
ssh.close() 
関連する問題