python通过pysftp加密上传、下载ftp服务器文件
import pysftp
import sys
Defines the name of the file for download / upload
remote_file = sys.argv[1]
srv = pysftp.Connection(host="your_FTP_server", username="your_username",
password="your_password")
Download the file from the remote server
srv.get(remote_file)
To upload the file, simple replace get with put.
srv.put(remote_file)
Closes the connection
srv.close()</pre>
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。