Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82593
| Date | 2014-12-17 16:35 -0800 |
|---|---|
| From | pengsir <elearn2014@gmail.com> |
| Subject | how can i get the file on my local pc from vps ip with paramiko or by some other way? |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17004.1418805330.18130.python-list@python.org> (permalink) |
I have an vps ,my local pc is in the local area network. When paramiko
installed on my local pc ,i can get file from my vps.
import paramiko
t = paramiko.Transport(("vps ip",22))
t.connect(username = "username", password = "key")
sftp = paramiko.SFTPClient.from_transport(t)
remotepath='/tmp/test.txt'
localpath='/tmp/test.txt'
sftp.get(remotepath,localpath)
Now the problem is :how can i get the file on my local pc from vps ip
with paramiko or by some other way?
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
how can i get the file on my local pc from vps ip with paramiko or by some other way? pengsir <elearn2014@gmail.com> - 2014-12-17 16:35 -0800
csiph-web