慕田峪9158850
尝试这个:#!/usr/bin/env pythonimport osimport paramiko ssh = paramiko.SSHClient()ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())ssh.connect('hostname', username="username", password="password")sftp = ssh.open_sftp()localpath = '/home/e100075/python/ss.txt'remotepath = '/home/developers/screenshots/ss.txt'sftp.put(localpath, remotepath)sftp.close()ssh.close()