Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82593 > unrolled thread

how can i get the file on my local pc from vps ip with paramiko or by some other way?

Started bypengsir <elearn2014@gmail.com>
First post2014-12-17 16:35 -0800
Last post2014-12-17 16:35 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  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

#82593 — how can i get the file on my local pc from vps ip with paramiko or by some other way?

Frompengsir <elearn2014@gmail.com>
Date2014-12-17 16:35 -0800
Subjecthow can i get the file on my local pc from vps ip with paramiko or by some other way?
Message-ID<mailman.17004.1418805330.18130.python-list@python.org>
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?

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web