Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > scp with paramiko

Reply
Thread Tools

scp with paramiko

 
 
cerr
Guest
Posts: n/a
 
      09-01-2010
Hi There,

I want to download a file from a client using paramiko. I found plenty
of ressources using google on how to send a file but none that would
describe how to download files from a client.
Help would be appreciated!
Thanks a lot!

Ron
 
Reply With Quote
 
 
 
 
Alexander Gattin
Guest
Posts: n/a
 
      09-14-2010
Hello,

On Wed, Sep 01, 2010 at 09:56:18AM -0700, cerr
wrote:
> I want to download a file from a client using
> paramiko. I found plenty of ressources using
> google on how to send a file but none that
> would describe how to download files from a
> client.


Download files from remote to local?
Get sftp object as usual, then e.g.:

for f in sftp.listdir(rdir):
lf = os.path.join(opts.tmpdir, f)
sftp.get(rdir + "/" + f, lf)

sftp.get() uses path + "/" + basename instead
of os.path.join() because the latter uses local
pathname conventions which may or may not be
appropriate for remote system.

--
With best regards,
xrgtn
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP did not finish successfully () (Net::SCP::Error Une Bévue Ruby 0 07-22-2008 04:26 PM
Maven using ANT plugin for SCP task : Embedded error: Could not create task or type of type: scp. krabhi Java 1 08-09-2006 04:19 PM
scp crit 2 mark | r HTML 7 12-15-2005 04:55 PM
Classes SSH-SCP for Java Xavier Java 9 11-05-2004 02:00 PM
Sanyo SCP 8100(s) stumpy Computer Support 1 02-20-2004 03:26 AM



Advertisments