📜  python sftp put 文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:03.529000             🧑  作者: Mango

代码示例1
import pysftp

srv = pysftp.Connection(host="www.destination.com", username="root",
password="password",log="./temp/pysftp.log")

with srv.cd('public'): #chdir to public
    srv.put('C:\Users\XXX\Dropbox\test.txt') #upload file to nodejs/

# Closes the connection
srv.close()