你知道如何将文件(可能导入套接字)发送到不在同一网络中的电脑吗?Python 2&3。谢谢
发布于 2019-06-24 14:21:02
您可以使用SCP包。下载使用:pip / pip3 install scp
from paramiko import SSHClient
from scp import SCPClient
ssh = SSHClient()
ssh.load_system_host_keys()
ssh.connect(host='ip address here',port=portnumberhere, username='usernamehere', password='passwordhere')
scp = SCPClient(ssh.get_transport())
scp.put('local/file/path',remote_path='remote/destination/path')
scp.close()
以下类似的解释/示例:https : //pypi.org/project/scp/ 如何在python中scp?
https://stackoverflow.com/questions/-100007041
复制相似问题