[Twisted-Python] how to scp with twisted?

Phil Mayers p.mayers at imperial.ac.uk
Mon Sep 4 16:35:01 EDT 2006

f rom wrote:
> hi, can you point me to a sample or whatever on how to
> implement "scp" secure file copy with twisted for
> python on windows ?

The very first hit for "twisted scp" on Google is a post containing code 
I wrote which does a simple copy remote -> local


The scp "application" is basically:

  1. ssh in
  2. authenticate
  3. open a channel
  4. run the "scp" app on the channel
  5. communicate using the rcp protocol to "scp" stdin/stdout via the 
SSH channel

The rcp protocol is undocumented as far as I can tell, and I had to read 
the openssh and putty source codes to get even that far, but if you have 
a dig then implementing the other bits e.g. local -> remote, directory 
listings (for recursive copies) and so on should not be that hard.


More information about the Twisted-Python mailing list