1import pysftp
2
3srv = pysftp.Connection(host="www.destination.com", username="root",
4password="password",log="./temp/pysftp.log")
5
6with srv.cd('public'): #chdir to public
7 srv.put('C:\Users\XXX\Dropbox\test.txt') #upload file to nodejs/
8
9# Closes the connection
10srv.close()