This topic created in 4149 days ago, the information mentioned may be changed or developed.
在本机上安装paramiko模块后,我可以从vps上下载文件到本地。
import paramiko
t = paramiko.Transport(("某IP地址",22))
t.connect(username = "用户名", password = "口令")
sftp = paramiko.SFTPClient.from_transport(t)
remotepath='/tmp/test.txt'
localpath='/tmp/test.txt'
sftp.get(remotepath,localpath)
现在,问题变一下:我要从我的vps上获得本机的文件,请问如何做?
可以使用paramiko实现吗?我的本机在局域网里面。
3 replies 2014-12-17 18:48:28 +08:00  | | 1 rrfeng Dec 17, 2014 sftp.put() |
 | | 2 aec4d Dec 17, 2014 下载用webfs 上传用xshell+lrzsz |
 | | 3 cece Dec 17, 2014 winscp |